From 8b96864326e1372aac0d9c13fe5c145f3da5c89d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 17 Sep 2023 08:33:30 -0500
Subject: [PATCH 01/31] Bump smartcontractkit/chainlink-github-actions from
2.2.12 to 2.2.13 (#10653)
Bumps [smartcontractkit/chainlink-github-actions](https://github.com/smartcontractkit/chainlink-github-actions) from 2.2.12 to 2.2.13.
- [Release notes](https://github.com/smartcontractkit/chainlink-github-actions/releases)
- [Commits](https://github.com/smartcontractkit/chainlink-github-actions/compare/v2.2.12...eccde1970eca69f079d3efb3409938a72ade8497)
---
updated-dependencies:
- dependency-name: smartcontractkit/chainlink-github-actions
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jordan Krage
---
.github/workflows/automation-benchmark-tests.yml | 2 +-
.github/workflows/automation-ondemand-tests.yml | 6 +++---
.github/workflows/ci-core.yml | 2 +-
.github/workflows/integration-chaos-tests.yml | 6 +++---
.github/workflows/on-demand-ocr-soak-test.yml | 2 +-
.github/workflows/performance-tests.yml | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/automation-benchmark-tests.yml b/.github/workflows/automation-benchmark-tests.yml
index 37330d059a..3eb44ea9c6 100644
--- a/.github/workflows/automation-benchmark-tests.yml
+++ b/.github/workflows/automation-benchmark-tests.yml
@@ -107,7 +107,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@00c6214deb10a3f374c6d3430c32c5202015d463 # v2.2.12
+ uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
env:
DETACH_RUNNER: true
TEST_SUITE: benchmark
diff --git a/.github/workflows/automation-ondemand-tests.yml b/.github/workflows/automation-ondemand-tests.yml
index d808c26f80..438264e222 100644
--- a/.github/workflows/automation-ondemand-tests.yml
+++ b/.github/workflows/automation-ondemand-tests.yml
@@ -49,7 +49,7 @@ jobs:
- name: Check if image exists
if: inputs.chainlinkImage == ''
id: check-image
- uses: smartcontractkit/chainlink-github-actions/docker/image-exists@00c6214deb10a3f374c6d3430c32c5202015d463 # v2.2.12
+ uses: smartcontractkit/chainlink-github-actions/docker/image-exists@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
with:
repository: chainlink
tag: ${{ github.sha }}${{ matrix.image.tag-suffix }}
@@ -57,7 +57,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@00c6214deb10a3f374c6d3430c32c5202015d463 # v2.2.12
+ uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
with:
cl_repo: smartcontractkit/chainlink
cl_ref: ${{ github.sha }}
@@ -160,7 +160,7 @@ jobs:
echo "version=develop" >>$GITHUB_OUTPUT
fi
- name: Run Tests
- uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@00c6214deb10a3f374c6d3430c32c5202015d463 # v2.2.12
+ uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
env:
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 }}
diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml
index b346cb9f4c..46df80db4a 100644
--- a/.github/workflows/ci-core.yml
+++ b/.github/workflows/ci-core.yml
@@ -132,7 +132,7 @@ jobs:
run: ./tools/bin/${{ matrix.cmd }} "${{ matrix.split.pkgs }}"
- name: Print Filtered Test Results
if: failure()
- uses: smartcontractkit/chainlink-github-actions/go/go-test-results-parsing@00c6214deb10a3f374c6d3430c32c5202015d463 # v2.2.12
+ uses: smartcontractkit/chainlink-github-actions/go/go-test-results-parsing@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
with:
results-file: ./output.txt
output-file: ./output-short.txt
diff --git a/.github/workflows/integration-chaos-tests.yml b/.github/workflows/integration-chaos-tests.yml
index 32f6f52239..8e1bfdd06c 100644
--- a/.github/workflows/integration-chaos-tests.yml
+++ b/.github/workflows/integration-chaos-tests.yml
@@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Check if image exists
id: check-image
- uses: smartcontractkit/chainlink-github-actions/docker/image-exists@00c6214deb10a3f374c6d3430c32c5202015d463 # v2.2.12
+ uses: smartcontractkit/chainlink-github-actions/docker/image-exists@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
with:
repository: chainlink
tag: ${{ github.sha }}
@@ -38,7 +38,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@00c6214deb10a3f374c6d3430c32c5202015d463 # v2.2.12
+ uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
with:
cl_repo: smartcontractkit/chainlink
cl_ref: ${{ github.sha }}
@@ -109,7 +109,7 @@ jobs:
- name: Checkout the repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Run Tests
- uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@00c6214deb10a3f374c6d3430c32c5202015d463 # v2.2.12
+ uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
with:
test_command_to_run: make test_need_operator_assets && cd integration-tests && go test -timeout 1h -count=1 -json -test.parallel 11 ./chaos 2>&1 | tee /tmp/gotest.log | gotestfmt
test_download_vendor_packages_command: cd ./integration-tests && go mod download
diff --git a/.github/workflows/on-demand-ocr-soak-test.yml b/.github/workflows/on-demand-ocr-soak-test.yml
index 8e154aa3b3..08e37d9c8e 100644
--- a/.github/workflows/on-demand-ocr-soak-test.yml
+++ b/.github/workflows/on-demand-ocr-soak-test.yml
@@ -121,7 +121,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@00c6214deb10a3f374c6d3430c32c5202015d463 # v2.2.12
+ uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
env:
DETACH_RUNNER: true
TEST_SUITE: soak
diff --git a/.github/workflows/performance-tests.yml b/.github/workflows/performance-tests.yml
index e96903e396..3297fa1d4b 100644
--- a/.github/workflows/performance-tests.yml
+++ b/.github/workflows/performance-tests.yml
@@ -57,7 +57,7 @@ jobs:
- name: Checkout the repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Run Tests
- uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@00c6214deb10a3f374c6d3430c32c5202015d463 # v2.2.12
+ uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
with:
test_command_to_run: cd integration-tests && go test -timeout 1h -count=1 -json -test.parallel 10 ./performance 2>&1 | tee /tmp/gotest.log | gotestfmt
test_download_vendor_packages_command: make gomod
From 157870fcb6934c160b669c17030fa5f79cf65fbd Mon Sep 17 00:00:00 2001
From: Finley Decker
Date: Sun, 17 Sep 2023 08:13:03 -0700
Subject: [PATCH 02/31] Added 0x7b transaction type for celo (#10660)
* added 0x7b tx type for celo
* linting
---------
Co-authored-by: Simson
---
core/chains/evm/gas/block_history_estimator_test.go | 6 +++++-
core/chains/evm/gas/chain_specific.go | 5 ++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/core/chains/evm/gas/block_history_estimator_test.go b/core/chains/evm/gas/block_history_estimator_test.go
index c44e68002d..e418e0d687 100644
--- a/core/chains/evm/gas/block_history_estimator_test.go
+++ b/core/chains/evm/gas/block_history_estimator_test.go
@@ -1316,13 +1316,17 @@ func TestBlockHistoryEstimator_IsUsable(t *testing.T) {
assert.Equal(t, true, bhe.IsUsable(tx, block, cfg.ChainType(), geCfg.PriceMin(), logger.TestLogger(t)))
})
- t.Run("returns false if transaction is of type 0x7c only on Celo", func(t *testing.T) {
+ t.Run("returns false if transaction is of type 0x7c or 0x7b only on Celo", func(t *testing.T) {
cfg.ChainTypeF = "celo"
tx := evmtypes.Transaction{Type: 0x7c, GasPrice: assets.NewWeiI(10), GasLimit: 42, Hash: utils.NewHash()}
assert.Equal(t, false, bhe.IsUsable(tx, block, cfg.ChainType(), geCfg.PriceMin(), logger.TestLogger(t)))
+ tx2 := evmtypes.Transaction{Type: 0x7b, GasPrice: assets.NewWeiI(10), GasLimit: 42, Hash: utils.NewHash()}
+ assert.Equal(t, false, bhe.IsUsable(tx2, block, cfg.ChainType(), geCfg.PriceMin(), logger.TestLogger(t)))
+
cfg.ChainTypeF = ""
assert.Equal(t, true, bhe.IsUsable(tx, block, cfg.ChainType(), geCfg.PriceMin(), logger.TestLogger(t)))
+ assert.Equal(t, true, bhe.IsUsable(tx2, block, cfg.ChainType(), geCfg.PriceMin(), logger.TestLogger(t)))
})
t.Run("returns false if transaction has base fee higher than the gas price only on Celo", func(t *testing.T) {
diff --git a/core/chains/evm/gas/chain_specific.go b/core/chains/evm/gas/chain_specific.go
index f2bcbf82df..cd38f49ee0 100644
--- a/core/chains/evm/gas/chain_specific.go
+++ b/core/chains/evm/gas/chain_specific.go
@@ -30,8 +30,8 @@ func chainSpecificIsUsable(tx evmtypes.Transaction, baseFee *assets.Wei, chainTy
}
}
if chainType == config.ChainCelo {
- // Celo specific transaction type that utilizes the feeCurrency field.
- if tx.Type == 0x7c {
+ // Celo specific transaction types that utilize the feeCurrency field.
+ if tx.Type == 0x7c || tx.Type == 0x7b {
return false
}
// Celo has not yet fully migrated to the 0x7c type for special feeCurrency transactions
@@ -40,7 +40,6 @@ func chainSpecificIsUsable(tx evmtypes.Transaction, baseFee *assets.Wei, chainTy
// until they fully migrate to 0x7c.
if baseFee != nil && tx.GasPrice.Cmp(baseFee) < 0 {
return false
-
}
}
return true
From fb645c1adfcd224c100c24da44ece039b4f61f1b Mon Sep 17 00:00:00 2001
From: Mateusz Sekara
Date: Mon, 18 Sep 2023 07:45:53 +0200
Subject: [PATCH 03/31] Backporting LogPoller's function used in CCIP (#10645)
* Backporting LogPoller's function used in CCIP
* Missing tests added as well
---
core/chains/evm/logpoller/disabled.go | 4 +++
core/chains/evm/logpoller/log_poller.go | 7 ++++
core/chains/evm/logpoller/mocks/log_poller.go | 33 +++++++++++++++++++
core/chains/evm/logpoller/observability.go | 6 ++++
.../evm/logpoller/observability_test.go | 3 +-
core/chains/evm/logpoller/orm.go | 25 ++++++++++++++
core/chains/evm/logpoller/orm_test.go | 15 +++++++++
7 files changed, 92 insertions(+), 1 deletion(-)
diff --git a/core/chains/evm/logpoller/disabled.go b/core/chains/evm/logpoller/disabled.go
index 602bd5cec2..c561c1fabc 100644
--- a/core/chains/evm/logpoller/disabled.go
+++ b/core/chains/evm/logpoller/disabled.go
@@ -100,3 +100,7 @@ func (d disabled) IndexedLogsCreatedAfter(eventSig common.Hash, address common.A
func (d disabled) LatestBlockByEventSigsAddrsWithConfs(fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs int, qopts ...pg.QOpt) (int64, error) {
return 0, ErrDisabled
}
+
+func (d disabled) LogsUntilBlockHashDataWordGreaterThan(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, untilBlockHash common.Hash, qopts ...pg.QOpt) ([]Log, error) {
+ return nil, ErrDisabled
+}
diff --git a/core/chains/evm/logpoller/log_poller.go b/core/chains/evm/logpoller/log_poller.go
index 227688fce1..81634add35 100644
--- a/core/chains/evm/logpoller/log_poller.go
+++ b/core/chains/evm/logpoller/log_poller.go
@@ -57,6 +57,7 @@ type LogPoller interface {
IndexedLogsWithSigsExcluding(address common.Address, eventSigA, eventSigB common.Hash, topicIndex int, fromBlock, toBlock int64, confs int, qopts ...pg.QOpt) ([]Log, error)
LogsDataWordRange(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin, wordValueMax common.Hash, confs int, qopts ...pg.QOpt) ([]Log, error)
LogsDataWordGreaterThan(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, confs int, qopts ...pg.QOpt) ([]Log, error)
+ LogsUntilBlockHashDataWordGreaterThan(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, untilBlockHash common.Hash, qopts ...pg.QOpt) ([]Log, error)
}
type LogPollerTest interface {
@@ -976,6 +977,12 @@ func (lp *logPoller) IndexedLogsTopicGreaterThan(eventSig common.Hash, address c
return lp.orm.SelectIndexLogsTopicGreaterThan(address, eventSig, topicIndex, topicValueMin, confs, qopts...)
}
+// LogsUntilBlockHashDataWordGreaterThan note index is 0 based.
+// If the blockhash is not found (i.e. a stale fork) it will error.
+func (lp *logPoller) LogsUntilBlockHashDataWordGreaterThan(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, untilBlockHash common.Hash, qopts ...pg.QOpt) ([]Log, error) {
+ return lp.orm.SelectUntilBlockHashDataWordGreaterThan(address, eventSig, wordIndex, wordValueMin, untilBlockHash, qopts...)
+}
+
func (lp *logPoller) IndexedLogsTopicRange(eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, topicValueMax common.Hash, confs int, qopts ...pg.QOpt) ([]Log, error) {
return lp.orm.SelectIndexLogsTopicRange(address, eventSig, topicIndex, topicValueMin, topicValueMax, confs, qopts...)
}
diff --git a/core/chains/evm/logpoller/mocks/log_poller.go b/core/chains/evm/logpoller/mocks/log_poller.go
index 3c30454a4f..455a6a146f 100644
--- a/core/chains/evm/logpoller/mocks/log_poller.go
+++ b/core/chains/evm/logpoller/mocks/log_poller.go
@@ -555,6 +555,39 @@ func (_m *LogPoller) LogsDataWordRange(eventSig common.Hash, address common.Addr
return r0, r1
}
+// LogsUntilBlockHashDataWordGreaterThan provides a mock function with given fields: eventSig, address, wordIndex, wordValueMin, untilBlockHash, qopts
+func (_m *LogPoller) LogsUntilBlockHashDataWordGreaterThan(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, untilBlockHash common.Hash, qopts ...pg.QOpt) ([]logpoller.Log, error) {
+ _va := make([]interface{}, len(qopts))
+ for _i := range qopts {
+ _va[_i] = qopts[_i]
+ }
+ var _ca []interface{}
+ _ca = append(_ca, eventSig, address, wordIndex, wordValueMin, untilBlockHash)
+ _ca = append(_ca, _va...)
+ ret := _m.Called(_ca...)
+
+ var r0 []logpoller.Log
+ var r1 error
+ if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, common.Hash, common.Hash, ...pg.QOpt) ([]logpoller.Log, error)); ok {
+ return rf(eventSig, address, wordIndex, wordValueMin, untilBlockHash, qopts...)
+ }
+ if rf, ok := ret.Get(0).(func(common.Hash, common.Address, int, common.Hash, common.Hash, ...pg.QOpt) []logpoller.Log); ok {
+ r0 = rf(eventSig, address, wordIndex, wordValueMin, untilBlockHash, qopts...)
+ } else {
+ if ret.Get(0) != nil {
+ r0 = ret.Get(0).([]logpoller.Log)
+ }
+ }
+
+ if rf, ok := ret.Get(1).(func(common.Hash, common.Address, int, common.Hash, common.Hash, ...pg.QOpt) error); ok {
+ r1 = rf(eventSig, address, wordIndex, wordValueMin, untilBlockHash, qopts...)
+ } else {
+ r1 = ret.Error(1)
+ }
+
+ return r0, r1
+}
+
// LogsWithSigs provides a mock function with given fields: start, end, eventSigs, address, qopts
func (_m *LogPoller) LogsWithSigs(start int64, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]logpoller.Log, error) {
_va := make([]interface{}, len(qopts))
diff --git a/core/chains/evm/logpoller/observability.go b/core/chains/evm/logpoller/observability.go
index f52d287859..38a4ca2143 100644
--- a/core/chains/evm/logpoller/observability.go
+++ b/core/chains/evm/logpoller/observability.go
@@ -140,6 +140,12 @@ func (o *ObservedLogPoller) LogsDataWordGreaterThan(eventSig common.Hash, addres
})
}
+func (o *ObservedLogPoller) LogsUntilBlockHashDataWordGreaterThan(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, untilBlockHash common.Hash, qopts ...pg.QOpt) ([]Log, error) {
+ return withObservedQueryAndResults(o, "LogsUntilBlockHashDataWordGreaterThan", func() ([]Log, error) {
+ return o.LogPoller.LogsUntilBlockHashDataWordGreaterThan(eventSig, address, wordIndex, wordValueMin, untilBlockHash, qopts...)
+ })
+}
+
func withObservedQueryAndResults[T any](o *ObservedLogPoller, queryName string, query func() ([]T, error)) ([]T, error) {
results, err := withObservedQuery(o, queryName, query)
if err == nil {
diff --git a/core/chains/evm/logpoller/observability_test.go b/core/chains/evm/logpoller/observability_test.go
index 8c9b18d922..5bd0a772d9 100644
--- a/core/chains/evm/logpoller/observability_test.go
+++ b/core/chains/evm/logpoller/observability_test.go
@@ -36,8 +36,9 @@ func TestMultipleMetricsArePublished(t *testing.T) {
_, _ = lp.LatestLogByEventSigWithConfs(common.Hash{}, common.Address{}, 0, pg.WithParentCtx(ctx))
_, _ = lp.LatestLogEventSigsAddrsWithConfs(0, []common.Hash{{}}, []common.Address{{}}, 1, pg.WithParentCtx(ctx))
_, _ = lp.IndexedLogsCreatedAfter(common.Hash{}, common.Address{}, 0, []common.Hash{}, time.Now(), 0, pg.WithParentCtx(ctx))
+ _, _ = lp.LogsUntilBlockHashDataWordGreaterThan(common.Hash{}, common.Address{}, 0, common.Hash{}, common.Hash{}, pg.WithParentCtx(ctx))
- require.Equal(t, 11, testutil.CollectAndCount(lp.queryDuration))
+ require.Equal(t, 12, testutil.CollectAndCount(lp.queryDuration))
require.Equal(t, 10, testutil.CollectAndCount(lp.datasetSize))
resetMetrics(*lp)
}
diff --git a/core/chains/evm/logpoller/orm.go b/core/chains/evm/logpoller/orm.go
index 3c678aeed3..3a0fb52cd6 100644
--- a/core/chains/evm/logpoller/orm.go
+++ b/core/chains/evm/logpoller/orm.go
@@ -400,6 +400,31 @@ func (o *ORM) SelectIndexLogsTopicGreaterThan(address common.Address, eventSig c
return logs, nil
}
+func (o *ORM) SelectUntilBlockHashDataWordGreaterThan(address common.Address, eventSig common.Hash, wordIndex int, wordValueMin common.Hash, untilBlockHash common.Hash, qopts ...pg.QOpt) ([]Log, error) {
+ var logs []Log
+ q := o.q.WithOpts(qopts...)
+ err := q.Transaction(func(tx pg.Queryer) error {
+ // We want to mimic the behaviour of the ETH RPC which errors if blockhash not found.
+ var block LogPollerBlock
+ if err := tx.Get(&block,
+ `SELECT * FROM evm.log_poller_blocks
+ WHERE evm_chain_id = $1 AND block_hash = $2`, utils.NewBig(o.chainID), untilBlockHash); err != nil {
+ return err
+ }
+ return q.Select(&logs,
+ `SELECT * FROM evm.logs
+ WHERE evm_chain_id = $1
+ AND address = $2 AND event_sig = $3
+ AND substring(data from 32*$4+1 for 32) >= $5
+ AND block_number <= $6
+ ORDER BY (block_number, log_index)`, utils.NewBig(o.chainID), address, eventSig.Bytes(), wordIndex, wordValueMin.Bytes(), block.BlockNumber)
+ })
+ if err != nil {
+ return nil, err
+ }
+ return logs, nil
+}
+
func (o *ORM) SelectIndexLogsTopicRange(address common.Address, eventSig common.Hash, topicIndex int, topicValueMin, topicValueMax common.Hash, confs int, qopts ...pg.QOpt) ([]Log, error) {
if err := validateTopicIndex(topicIndex); err != nil {
return nil, err
diff --git a/core/chains/evm/logpoller/orm_test.go b/core/chains/evm/logpoller/orm_test.go
index 73128c311d..e8b5a90ce0 100644
--- a/core/chains/evm/logpoller/orm_test.go
+++ b/core/chains/evm/logpoller/orm_test.go
@@ -563,6 +563,21 @@ func TestORM_DataWords(t *testing.T) {
lgs, err = o1.SelectDataWordGreaterThan(addr, eventSig, 0, logpoller.EvmWord(1), 0)
require.NoError(t, err)
assert.Equal(t, 2, len(lgs))
+
+ // Unknown hash should an error
+ lgs, err = o1.SelectUntilBlockHashDataWordGreaterThan(addr, eventSig, 0, logpoller.EvmWord(1), common.HexToHash("0x3"))
+ require.Error(t, err)
+ assert.Equal(t, 0, len(lgs))
+
+ // 1 block should include first log
+ lgs, err = o1.SelectUntilBlockHashDataWordGreaterThan(addr, eventSig, 0, logpoller.EvmWord(1), common.HexToHash("0x1"))
+ require.NoError(t, err)
+ assert.Equal(t, 1, len(lgs))
+
+ // 2 block should include both
+ lgs, err = o1.SelectUntilBlockHashDataWordGreaterThan(addr, eventSig, 0, logpoller.EvmWord(1), common.HexToHash("0x2"))
+ require.NoError(t, err)
+ assert.Equal(t, 2, len(lgs))
}
func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) {
From c92d62390c0df1c0a3e722c450e623b3bbd15dd1 Mon Sep 17 00:00:00 2001
From: "app-token-issuer-infra-releng[bot]"
<120227048+app-token-issuer-infra-releng[bot]@users.noreply.github.com>
Date: Mon, 18 Sep 2023 08:36:55 +0000
Subject: [PATCH 04/31] Update Operator UI from v0.8.0-95ae9da to
v0.8.0-197331a (#10564)
* Update Operator UI from v0.8.0-95ae9da to v0.8.0-197331a
* Trigger build
---------
Co-authored-by: github-merge-queue
Co-authored-by: george-dorin
---
operator_ui/TAG | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/operator_ui/TAG b/operator_ui/TAG
index b6ab818cb5..10da1e7ab2 100644
--- a/operator_ui/TAG
+++ b/operator_ui/TAG
@@ -1 +1 @@
-v0.8.0-95ae9da
+v0.8.0-197331a
From 1eda1ee311c1251d35bf2dc3bafbfd32b0ef8288 Mon Sep 17 00:00:00 2001
From: Akshay Aggarwal <71980293+infiloop2@users.noreply.github.com>
Date: Mon, 18 Sep 2023 10:20:57 +0100
Subject: [PATCH 05/31] Set trigger config when node cannot find setConfig logs
during refresh (#10617)
* Set trigger config when node cannot find setConfig logs during refresh
* update comment
---
.../services/ocr2/plugins/ocr2keeper/evm21/registry.go | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/core/services/ocr2/plugins/ocr2keeper/evm21/registry.go b/core/services/ocr2/plugins/ocr2keeper/evm21/registry.go
index a4684e6707..590e5138b3 100644
--- a/core/services/ocr2/plugins/ocr2keeper/evm21/registry.go
+++ b/core/services/ocr2/plugins/ocr2keeper/evm21/registry.go
@@ -337,14 +337,16 @@ func (r *EvmRegistry) refreshLogTriggerUpkeepsBatch(logTriggerIDs []*big.Int) er
for _, id := range logTriggerIDs {
logBlock, ok := configSetBlockNumbers[id.String()]
if !ok {
- r.lggr.Warnf("unable to find finalized config set block number for %s, skipping refresh", id.String())
- continue
+ r.lggr.Warnf("unable to find finalized config set block number for %s, using 0 as config start block", id.String())
+ // Use zero as config update block so it can be updated if an actual event is found later
+ logBlock = 0
}
config, ok := perUpkeepConfig[id.String()]
if !ok {
- r.lggr.Warnf("unable to find per finalized log config for %s, skipping refresh", id.String())
- continue
+ r.lggr.Warnf("unable to find per finalized log config for %s, will fetch latest config from chain", id.String())
+ // Set it to empty bytes so that latest config is fetched within r.updateTriggerConfig
+ config = []byte{}
}
// In case an upkeep was paused then unpaused after a config set event, start the config from the unpaused block number
From 4c2c36de6e19781c49c0f39179b62adf9ac4e661 Mon Sep 17 00:00:00 2001
From: george-dorin <120329946+george-dorin@users.noreply.github.com>
Date: Mon, 18 Sep 2023 15:52:23 +0300
Subject: [PATCH 06/31] Change the inBackupHealthReport status code to 204 (No
content) (#10673)
* Change the inBackupHealthReport status code to 204 (No content)
* Add changelog
---
core/services/health.go | 6 +-----
core/services/health_test.go | 7 +------
docs/CHANGELOG.md | 3 ++-
3 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/core/services/health.go b/core/services/health.go
index b9367429db..da3a99b34d 100644
--- a/core/services/health.go
+++ b/core/services/health.go
@@ -252,11 +252,7 @@ func (i *InBackupHealthReport) Stop() {
func (i *InBackupHealthReport) Start() {
go func() {
http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusServiceUnavailable)
- _, err := w.Write([]byte("Database backup in progress..."))
- if err != nil {
- i.lggr.Errorf("Cannot write response to /health")
- }
+ w.WriteHeader(http.StatusNoContent)
})
i.lggr.Info("Starting InBackupHealthReport")
if err := i.server.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) {
diff --git a/core/services/health_test.go b/core/services/health_test.go
index 56c91277e4..295eb86119 100644
--- a/core/services/health_test.go
+++ b/core/services/health_test.go
@@ -2,7 +2,6 @@ package services_test
import (
"fmt"
- "io"
"net/http"
"testing"
"time"
@@ -81,11 +80,7 @@ func TestNewInBackupHealthReport(t *testing.T) {
res, err := http.Get("http://localhost:1234/health")
require.NoError(t, err)
- require.Equal(t, http.StatusServiceUnavailable, res.StatusCode)
-
- resBody, err := io.ReadAll(res.Body)
- require.NoError(t, err)
- require.Equal(t, "Database backup in progress...", string(resBody))
+ require.Equal(t, http.StatusNoContent, res.StatusCode)
ibhr.Stop()
require.Eventually(t, func() bool { return observed.Len() >= 1 }, time.Second*5, time.Millisecond*100)
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index aa98a138c8..d2e3dfada9 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -26,7 +26,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
```[ERROR] Error in transaction, rolling back: session missing or expired, please login again pg/transaction.go:118 ```
- Fixed a bug that was preventing job runs to be displayed when the job `chainID` was disabled.
- `chainlink txs evm create` returns a transaction hash for the attempted transaction in the CLI. Previously only the sender, recipient and `unstarted` state were returned.
-- Fixed a bug when when `evmChainId` is requested instead of `id` or `evm-chain-id` in CLI error verbatim
+- Fixed a bug where `evmChainId` is requested instead of `id` or `evm-chain-id` in CLI error verbatim
+- Fixed a bug that would cause the node to shut down while performing backup
## 2.5.0 - UNRELEASED
=======
From 53b98423cfc508f49c1f3af177350846f5a97f5f Mon Sep 17 00:00:00 2001
From: Sam
Date: Mon, 18 Sep 2023 10:38:59 -0400
Subject: [PATCH 07/31] Bump relay to 2119b4e577d1876ac06a345a8db639f919839369
(#10675)
---
core/scripts/go.mod | 2 +-
core/scripts/go.sum | 4 ++--
go.mod | 2 +-
go.sum | 4 ++--
integration-tests/go.mod | 2 +-
integration-tests/go.sum | 4 ++--
6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/core/scripts/go.mod b/core/scripts/go.mod
index adf4f65f51..edc23cf004 100644
--- a/core/scripts/go.mod
+++ b/core/scripts/go.mod
@@ -299,7 +299,7 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 // indirect
- github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230912195355-fec1da7953fc // indirect
+ github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1 // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 // indirect
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
diff --git a/core/scripts/go.sum b/core/scripts/go.sum
index dcc236cec2..674b96aff9 100644
--- a/core/scripts/go.sum
+++ b/core/scripts/go.sum
@@ -1377,8 +1377,8 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 h1:vdieOW3CZGdD2R5zvCSMS+0vksyExPN3/Fa1uVfld/A=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230912195355-fec1da7953fc h1:mQCCjnDz2I1XlYv/fDyFnEB8ryAchlpz12Eg0f7n/N0=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230912195355-fec1da7953fc/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1 h1:0dCYAYQrYjhoz/NUS4X0HZh09s6fdslGqx8h27hRFf4=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca/go.mod h1:RIUJXn7EVp24TL2p4FW79dYjyno23x5mjt1nKN+5WEk=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw=
diff --git a/go.mod b/go.mod
index 2e580e19dc..19475db45a 100644
--- a/go.mod
+++ b/go.mod
@@ -67,7 +67,7 @@ require (
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47
- github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230912195355-fec1da7953fc
+ github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918
github.com/smartcontractkit/libocr v0.0.0-20230816220705-665e93233ae5
diff --git a/go.sum b/go.sum
index 3db218d6c9..7a3aa496e1 100644
--- a/go.sum
+++ b/go.sum
@@ -1377,8 +1377,8 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 h1:vdieOW3CZGdD2R5zvCSMS+0vksyExPN3/Fa1uVfld/A=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230912195355-fec1da7953fc h1:mQCCjnDz2I1XlYv/fDyFnEB8ryAchlpz12Eg0f7n/N0=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230912195355-fec1da7953fc/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1 h1:0dCYAYQrYjhoz/NUS4X0HZh09s6fdslGqx8h27hRFf4=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca/go.mod h1:RIUJXn7EVp24TL2p4FW79dYjyno23x5mjt1nKN+5WEk=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw=
diff --git a/integration-tests/go.mod b/integration-tests/go.mod
index 9edf6d72be..e5edd10056 100644
--- a/integration-tests/go.mod
+++ b/integration-tests/go.mod
@@ -384,7 +384,7 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 // indirect
- github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230912195355-fec1da7953fc // indirect
+ github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1 // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 // indirect
github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb // indirect
diff --git a/integration-tests/go.sum b/integration-tests/go.sum
index 55686ce2ef..9c6c296523 100644
--- a/integration-tests/go.sum
+++ b/integration-tests/go.sum
@@ -2252,8 +2252,8 @@ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc4
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8=
github.com/smartcontractkit/chainlink-env v0.36.0 h1:CFOjs0c0y3lrHi/fl5qseCH9EQa5W/6CFyOvmhe2VnA=
github.com/smartcontractkit/chainlink-env v0.36.0/go.mod h1:NbRExHmJGnKSYXmvNuJx5VErSx26GtE1AEN/CRzYOg8=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230912195355-fec1da7953fc h1:mQCCjnDz2I1XlYv/fDyFnEB8ryAchlpz12Eg0f7n/N0=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230912195355-fec1da7953fc/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1 h1:0dCYAYQrYjhoz/NUS4X0HZh09s6fdslGqx8h27hRFf4=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca/go.mod h1:RIUJXn7EVp24TL2p4FW79dYjyno23x5mjt1nKN+5WEk=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw=
From 1bb0c1a355039fbfd77fecc784121ec935c56f1a Mon Sep 17 00:00:00 2001
From: Andrei Smirnov
Date: Mon, 18 Sep 2023 18:01:49 +0300
Subject: [PATCH 08/31] Functions: tracking subscriptions (#10613)
* Functions: tracking subscriptions
* Fixing linter issue
* Bugfixing
* Reworking solution
* Fixed tests
* Fixed linter error
* Addressed PR feedback
* Added minimum balance config
* Added subscriptions check to gateway
* Using assets.Link
* Fixed template and naming
* Reverted renaming
---
core/scripts/functions/templates/oracle.toml | 9 +
core/services/functions/connector_handler.go | 41 ++--
.../functions/connector_handler_test.go | 7 +-
.../handlers/functions/handler.functions.go | 38 +++-
.../functions/handler.functions_test.go | 19 +-
.../functions/mocks/onchain_subscriptions.go | 86 ++++++++
.../handlers/functions/subscriptions.go | 208 ++++++++++++++++++
.../handlers/functions/subscriptions_test.go | 66 ++++++
.../handlers/functions/user_subscriptions.go | 64 ++++++
.../functions/user_subscriptions_test.go | 77 +++++++
.../ocr2/plugins/functions/config/config.go | 45 ++--
.../services/ocr2/plugins/functions/plugin.go | 13 +-
.../ocr2/plugins/functions/plugin_test.go | 7 +-
13 files changed, 625 insertions(+), 55 deletions(-)
create mode 100644 core/services/gateway/handlers/functions/mocks/onchain_subscriptions.go
create mode 100644 core/services/gateway/handlers/functions/subscriptions.go
create mode 100644 core/services/gateway/handlers/functions/subscriptions_test.go
create mode 100644 core/services/gateway/handlers/functions/user_subscriptions.go
create mode 100644 core/services/gateway/handlers/functions/user_subscriptions_test.go
diff --git a/core/scripts/functions/templates/oracle.toml b/core/scripts/functions/templates/oracle.toml
index 208637b50f..58f20afdd9 100644
--- a/core/scripts/functions/templates/oracle.toml
+++ b/core/scripts/functions/templates/oracle.toml
@@ -35,6 +35,8 @@ requestTimeoutCheckFrequencySec = 10
requestTimeoutSec = 300
maxRequestSizesList = [30_720, 51_200, 102_400, 204_800, 512_000, 1_048_576, 2_097_152, 3_145_728, 5_242_880, 10_485_760]
maxSecretsSizesList = [10_240, 20_480, 51_200, 102_400, 307_200, 512_000, 1_048_576, 2_097_152]
+minimumSubscriptionBalance = "0.1 link"
+
[pluginConfig.OnchainAllowlist]
blockConfirmations = 1
@@ -43,6 +45,13 @@ maxSecretsSizesList = [10_240, 20_480, 51_200, 102_400, 307_200, 512_000, 1_048_
updateFrequencySec = 30
updateTimeoutSec = 10
+ [pluginConfig.OnchainSubscriptions]
+ blockConfirmations = 1
+ contractAddress = "{{router_contract_address}}"
+ updateFrequencySec = 30
+ updateTimeoutSec = 10
+ updateRangeSize = 100
+
[pluginConfig.RateLimiter]
globalBurst = 5
globalRPS = 10
diff --git a/core/services/functions/connector_handler.go b/core/services/functions/connector_handler.go
index 31d47716c0..8083dfc2a3 100644
--- a/core/services/functions/connector_handler.go
+++ b/core/services/functions/connector_handler.go
@@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
+ "github.com/smartcontractkit/chainlink/v2/core/assets"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/api"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/common"
@@ -21,13 +22,15 @@ import (
type functionsConnectorHandler struct {
utils.StartStopOnce
- connector connector.GatewayConnector
- signerKey *ecdsa.PrivateKey
- nodeAddress string
- storage s4.Storage
- allowlist functions.OnchainAllowlist
- rateLimiter *hc.RateLimiter
- lggr logger.Logger
+ connector connector.GatewayConnector
+ signerKey *ecdsa.PrivateKey
+ nodeAddress string
+ storage s4.Storage
+ allowlist functions.OnchainAllowlist
+ rateLimiter *hc.RateLimiter
+ subscriptions functions.OnchainSubscriptions
+ minimumBalance assets.Link
+ lggr logger.Logger
}
var (
@@ -35,17 +38,19 @@ var (
_ connector.GatewayConnectorHandler = &functionsConnectorHandler{}
)
-func NewFunctionsConnectorHandler(nodeAddress string, signerKey *ecdsa.PrivateKey, storage s4.Storage, allowlist functions.OnchainAllowlist, rateLimiter *hc.RateLimiter, lggr logger.Logger) (*functionsConnectorHandler, error) {
- if signerKey == nil || storage == nil || allowlist == nil || rateLimiter == nil {
- return nil, fmt.Errorf("signerKey, storage, allowlist and rateLimiter must be non-nil")
+func NewFunctionsConnectorHandler(nodeAddress string, signerKey *ecdsa.PrivateKey, storage s4.Storage, allowlist functions.OnchainAllowlist, rateLimiter *hc.RateLimiter, subscriptions functions.OnchainSubscriptions, minimumBalance assets.Link, lggr logger.Logger) (*functionsConnectorHandler, error) {
+ if signerKey == nil || storage == nil || allowlist == nil || rateLimiter == nil || subscriptions == nil {
+ return nil, fmt.Errorf("signerKey, storage, allowlist, rateLimiter and subscriptions must be non-nil")
}
return &functionsConnectorHandler{
- nodeAddress: nodeAddress,
- signerKey: signerKey,
- storage: storage,
- allowlist: allowlist,
- rateLimiter: rateLimiter,
- lggr: lggr.Named("FunctionsConnectorHandler"),
+ nodeAddress: nodeAddress,
+ signerKey: signerKey,
+ storage: storage,
+ allowlist: allowlist,
+ rateLimiter: rateLimiter,
+ subscriptions: subscriptions,
+ minimumBalance: minimumBalance,
+ lggr: lggr.Named("FunctionsConnectorHandler"),
}, nil
}
@@ -68,6 +73,10 @@ func (h *functionsConnectorHandler) HandleGatewayMessage(ctx context.Context, ga
h.lggr.Errorw("request rate-limited", "id", gatewayId, "address", fromAddr)
return
}
+ if balance, err := h.subscriptions.GetMaxUserBalance(fromAddr); err != nil || balance.Cmp(h.minimumBalance.ToInt()) < 0 {
+ h.lggr.Errorw("user subscription has insufficient balance", "id", gatewayId, "address", fromAddr, "balance", balance, "minBalance", h.minimumBalance)
+ return
+ }
h.lggr.Debugw("handling gateway request", "id", gatewayId, "method", body.Method)
diff --git a/core/services/functions/connector_handler_test.go b/core/services/functions/connector_handler_test.go
index 99b0cba0a2..de327f2983 100644
--- a/core/services/functions/connector_handler_test.go
+++ b/core/services/functions/connector_handler_test.go
@@ -4,8 +4,10 @@ import (
"encoding/base64"
"encoding/json"
"errors"
+ "math/big"
"testing"
+ "github.com/smartcontractkit/chainlink/v2/core/assets"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/functions"
@@ -31,10 +33,11 @@ func TestFunctionsConnectorHandler(t *testing.T) {
connector := gcmocks.NewGatewayConnector(t)
allowlist := gfmocks.NewOnchainAllowlist(t)
rateLimiter, err := hc.NewRateLimiter(hc.RateLimiterConfig{GlobalRPS: 100.0, GlobalBurst: 100, PerSenderRPS: 100.0, PerSenderBurst: 100})
+ subscriptions := gfmocks.NewOnchainSubscriptions(t)
require.NoError(t, err)
allowlist.On("Start", mock.Anything).Return(nil)
allowlist.On("Close", mock.Anything).Return(nil)
- handler, err := functions.NewFunctionsConnectorHandler(addr.Hex(), privateKey, storage, allowlist, rateLimiter, logger)
+ handler, err := functions.NewFunctionsConnectorHandler(addr.Hex(), privateKey, storage, allowlist, rateLimiter, subscriptions, *assets.NewLinkFromJuels(0), logger)
require.NoError(t, err)
handler.SetConnector(connector)
@@ -73,6 +76,7 @@ func TestFunctionsConnectorHandler(t *testing.T) {
}
storage.On("List", ctx, addr).Return(snapshot, nil).Once()
allowlist.On("Allow", addr).Return(true).Once()
+ subscriptions.On("GetMaxUserBalance", mock.Anything).Return(big.NewInt(100), nil)
connector.On("SendToGateway", ctx, "gw1", mock.Anything).Run(func(args mock.Arguments) {
msg, ok := args[2].(*api.Message)
require.True(t, ok)
@@ -129,6 +133,7 @@ func TestFunctionsConnectorHandler(t *testing.T) {
storage.On("Put", ctx, &key, &record, signature).Return(nil).Once()
allowlist.On("Allow", addr).Return(true).Once()
+ subscriptions.On("GetMaxUserBalance", mock.Anything).Return(big.NewInt(100), nil)
connector.On("SendToGateway", ctx, "gw1", mock.Anything).Run(func(args mock.Arguments) {
msg, ok := args[2].(*api.Message)
require.True(t, ok)
diff --git a/core/services/gateway/handlers/functions/handler.functions.go b/core/services/gateway/handlers/functions/handler.functions.go
index 61590327e3..722ac13683 100644
--- a/core/services/gateway/handlers/functions/handler.functions.go
+++ b/core/services/gateway/handlers/functions/handler.functions.go
@@ -4,12 +4,14 @@ import (
"context"
"encoding/json"
"errors"
+ "fmt"
"time"
"github.com/ethereum/go-ethereum/common"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
+ "github.com/smartcontractkit/chainlink/v2/core/assets"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/api"
@@ -51,9 +53,12 @@ var (
)
type FunctionsHandlerConfig struct {
- OnchainAllowlistChainID string `json:"onchainAllowlistChainId"`
+ ChainID string `json:"chainId"`
// Not specifying OnchainAllowlist config disables allowlist checks
OnchainAllowlist *OnchainAllowlistConfig `json:"onchainAllowlist"`
+ // Not specifying OnchainSubscriptions config disables minimum balance checks
+ OnchainSubscriptions *OnchainSubscriptionsConfig `json:"onchainSubscriptions"`
+ MinimumSubscriptionBalance *assets.Link `json:"minimumSubscriptionBalance"`
// Not specifying RateLimiter config disables rate limiting
UserRateLimiter *hc.RateLimiterConfig `json:"userRateLimiter"`
NodeRateLimiter *hc.RateLimiterConfig `json:"nodeRateLimiter"`
@@ -69,6 +74,8 @@ type functionsHandler struct {
don handlers.DON
pendingRequests hc.RequestCache[PendingSecretsRequest]
allowlist OnchainAllowlist
+ subscriptions OnchainSubscriptions
+ minimumBalance *assets.Link
userRateLimiter *hc.RateLimiter
nodeRateLimiter *hc.RateLimiter
chStop utils.StopChan
@@ -93,13 +100,13 @@ func NewFunctionsHandlerFromConfig(handlerConfig json.RawMessage, donConfig *con
lggr = lggr.Named("FunctionsHandler:" + donConfig.DonId)
var allowlist OnchainAllowlist
if cfg.OnchainAllowlist != nil {
- chain, err2 := legacyChains.Get(cfg.OnchainAllowlistChainID)
+ chain, err2 := legacyChains.Get(cfg.ChainID)
if err2 != nil {
- return nil, err
+ return nil, err2
}
allowlist, err2 = NewOnchainAllowlist(chain.Client(), *cfg.OnchainAllowlist, lggr)
if err2 != nil {
- return nil, err
+ return nil, err2
}
}
var userRateLimiter, nodeRateLimiter *hc.RateLimiter
@@ -115,8 +122,19 @@ func NewFunctionsHandlerFromConfig(handlerConfig json.RawMessage, donConfig *con
return nil, err
}
}
+ var subscriptions OnchainSubscriptions
+ if cfg.OnchainSubscriptions != nil {
+ chain, err2 := legacyChains.Get(cfg.ChainID)
+ if err2 != nil {
+ return nil, err2
+ }
+ subscriptions, err2 = NewOnchainSubscriptions(chain.Client(), *cfg.OnchainSubscriptions, lggr)
+ if err2 != nil {
+ return nil, err2
+ }
+ }
pendingRequestsCache := hc.NewRequestCache[PendingSecretsRequest](time.Millisecond*time.Duration(cfg.RequestTimeoutMillis), cfg.MaxPendingRequests)
- return NewFunctionsHandler(cfg, donConfig, don, pendingRequestsCache, allowlist, userRateLimiter, nodeRateLimiter, lggr), nil
+ return NewFunctionsHandler(cfg, donConfig, don, pendingRequestsCache, allowlist, subscriptions, cfg.MinimumSubscriptionBalance, userRateLimiter, nodeRateLimiter, lggr), nil
}
func NewFunctionsHandler(
@@ -125,6 +143,8 @@ func NewFunctionsHandler(
don handlers.DON,
pendingRequestsCache hc.RequestCache[PendingSecretsRequest],
allowlist OnchainAllowlist,
+ subscriptions OnchainSubscriptions,
+ minimumBalance *assets.Link,
userRateLimiter *hc.RateLimiter,
nodeRateLimiter *hc.RateLimiter,
lggr logger.Logger) handlers.Handler {
@@ -134,6 +154,8 @@ func NewFunctionsHandler(
don: don,
pendingRequests: pendingRequestsCache,
allowlist: allowlist,
+ subscriptions: subscriptions,
+ minimumBalance: minimumBalance,
userRateLimiter: userRateLimiter,
nodeRateLimiter: nodeRateLimiter,
chStop: make(utils.StopChan),
@@ -153,6 +175,12 @@ func (h *functionsHandler) HandleUserMessage(ctx context.Context, msg *api.Messa
promHandlerError.WithLabelValues(h.donConfig.DonId, ErrRateLimited.Error()).Inc()
return ErrRateLimited
}
+ if h.subscriptions != nil && h.minimumBalance != nil {
+ if balance, err := h.subscriptions.GetMaxUserBalance(sender); err != nil || balance.Cmp(h.minimumBalance.ToInt()) < 0 {
+ h.lggr.Debug("received a message from a user having insufficient balance", "sender", msg.Body.Sender, "balance", balance.String())
+ return fmt.Errorf("sender has insufficient balance: %v juels", balance.String())
+ }
+ }
switch msg.Body.Method {
case MethodSecretsSet, MethodSecretsList:
return h.handleSecretsRequest(ctx, msg, callbackCh)
diff --git a/core/services/gateway/handlers/functions/handler.functions_test.go b/core/services/gateway/handlers/functions/handler.functions_test.go
index 12fa8b954f..1446bc8457 100644
--- a/core/services/gateway/handlers/functions/handler.functions_test.go
+++ b/core/services/gateway/handlers/functions/handler.functions_test.go
@@ -4,6 +4,7 @@ import (
"crypto/ecdsa"
"encoding/json"
"fmt"
+ "math/big"
"testing"
"time"
@@ -11,6 +12,7 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
+ "github.com/smartcontractkit/chainlink/v2/core/assets"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/api"
@@ -23,7 +25,7 @@ import (
handlers_mocks "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/mocks"
)
-func newFunctionsHandlerForATestDON(t *testing.T, nodes []gc.TestNode, requestTimeout time.Duration) (handlers.Handler, *handlers_mocks.DON, *functions_mocks.OnchainAllowlist) {
+func newFunctionsHandlerForATestDON(t *testing.T, nodes []gc.TestNode, requestTimeout time.Duration) (handlers.Handler, *handlers_mocks.DON, *functions_mocks.OnchainAllowlist, *functions_mocks.OnchainSubscriptions) {
cfg := functions.FunctionsHandlerConfig{}
donConfig := &config.DONConfig{
Members: []config.NodeConfig{},
@@ -39,13 +41,15 @@ func newFunctionsHandlerForATestDON(t *testing.T, nodes []gc.TestNode, requestTi
don := handlers_mocks.NewDON(t)
allowlist := functions_mocks.NewOnchainAllowlist(t)
+ subscriptions := functions_mocks.NewOnchainSubscriptions(t)
+ minBalance := assets.NewLinkFromJuels(100)
userRateLimiter, err := hc.NewRateLimiter(hc.RateLimiterConfig{GlobalRPS: 100.0, GlobalBurst: 100, PerSenderRPS: 100.0, PerSenderBurst: 100})
require.NoError(t, err)
nodeRateLimiter, err := hc.NewRateLimiter(hc.RateLimiterConfig{GlobalRPS: 100.0, GlobalBurst: 100, PerSenderRPS: 100.0, PerSenderBurst: 100})
require.NoError(t, err)
pendingRequestsCache := hc.NewRequestCache[functions.PendingSecretsRequest](requestTimeout, 1000)
- handler := functions.NewFunctionsHandler(cfg, donConfig, don, pendingRequestsCache, allowlist, userRateLimiter, nodeRateLimiter, logger.TestLogger(t))
- return handler, don, allowlist
+ handler := functions.NewFunctionsHandler(cfg, donConfig, don, pendingRequestsCache, allowlist, subscriptions, minBalance, userRateLimiter, nodeRateLimiter, logger.TestLogger(t))
+ return handler, don, allowlist, subscriptions
}
func newSignedMessage(t *testing.T, id string, method string, donId string, privateKey *ecdsa.PrivateKey) api.Message {
@@ -113,7 +117,7 @@ func TestFunctionsHandler_HandleUserMessage_SecretsSet(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
nodes, user := gc.NewTestNodes(t, 4), gc.NewTestNodes(t, 1)[0]
- handler, don, allowlist := newFunctionsHandlerForATestDON(t, nodes, time.Hour*24)
+ handler, don, allowlist, subscriptions := newFunctionsHandlerForATestDON(t, nodes, time.Hour*24)
userRequestMsg := newSignedMessage(t, "1234", "secrets_set", "don_id", user.PrivateKey)
callbachCh := make(chan handlers.UserCallbackPayload)
@@ -131,6 +135,7 @@ func TestFunctionsHandler_HandleUserMessage_SecretsSet(t *testing.T) {
}()
allowlist.On("Allow", common.HexToAddress(user.Address)).Return(true, nil)
+ subscriptions.On("GetMaxUserBalance", common.HexToAddress(user.Address)).Return(big.NewInt(1000), nil)
don.On("SendToNode", mock.Anything, mock.Anything, mock.Anything).Return(nil)
require.NoError(t, handler.HandleUserMessage(testutils.Context(t), &userRequestMsg, callbachCh))
sendNodeReponses(t, handler, userRequestMsg, nodes, test.nodeResults)
@@ -143,10 +148,11 @@ func TestFunctionsHandler_HandleUserMessage_InvalidMethod(t *testing.T) {
t.Parallel()
nodes, user := gc.NewTestNodes(t, 4), gc.NewTestNodes(t, 1)[0]
- handler, _, allowlist := newFunctionsHandlerForATestDON(t, nodes, time.Hour*24)
+ handler, _, allowlist, subscriptions := newFunctionsHandlerForATestDON(t, nodes, time.Hour*24)
userRequestMsg := newSignedMessage(t, "1234", "secrets_reveal_all_please", "don_id", user.PrivateKey)
allowlist.On("Allow", common.HexToAddress(user.Address)).Return(true, nil)
+ subscriptions.On("GetMaxUserBalance", common.HexToAddress(user.Address)).Return(big.NewInt(1000), nil)
err := handler.HandleUserMessage(testutils.Context(t), &userRequestMsg, make(chan handlers.UserCallbackPayload))
require.Error(t, err)
}
@@ -155,7 +161,7 @@ func TestFunctionsHandler_HandleUserMessage_Timeout(t *testing.T) {
t.Parallel()
nodes, user := gc.NewTestNodes(t, 4), gc.NewTestNodes(t, 1)[0]
- handler, don, allowlist := newFunctionsHandlerForATestDON(t, nodes, time.Millisecond*10)
+ handler, don, allowlist, subscriptions := newFunctionsHandlerForATestDON(t, nodes, time.Millisecond*10)
userRequestMsg := newSignedMessage(t, "1234", "secrets_set", "don_id", user.PrivateKey)
callbachCh := make(chan handlers.UserCallbackPayload)
@@ -169,6 +175,7 @@ func TestFunctionsHandler_HandleUserMessage_Timeout(t *testing.T) {
}()
allowlist.On("Allow", common.HexToAddress(user.Address)).Return(true, nil)
+ subscriptions.On("GetMaxUserBalance", common.HexToAddress(user.Address)).Return(big.NewInt(1000), nil)
don.On("SendToNode", mock.Anything, mock.Anything, mock.Anything).Return(nil)
require.NoError(t, handler.HandleUserMessage(testutils.Context(t), &userRequestMsg, callbachCh))
<-done
diff --git a/core/services/gateway/handlers/functions/mocks/onchain_subscriptions.go b/core/services/gateway/handlers/functions/mocks/onchain_subscriptions.go
new file mode 100644
index 0000000000..8639740746
--- /dev/null
+++ b/core/services/gateway/handlers/functions/mocks/onchain_subscriptions.go
@@ -0,0 +1,86 @@
+// Code generated by mockery v2.28.1. DO NOT EDIT.
+
+package mocks
+
+import (
+ context "context"
+ big "math/big"
+
+ common "github.com/ethereum/go-ethereum/common"
+
+ mock "github.com/stretchr/testify/mock"
+)
+
+// OnchainSubscriptions is an autogenerated mock type for the OnchainSubscriptions type
+type OnchainSubscriptions struct {
+ mock.Mock
+}
+
+// Close provides a mock function with given fields:
+func (_m *OnchainSubscriptions) Close() error {
+ ret := _m.Called()
+
+ var r0 error
+ if rf, ok := ret.Get(0).(func() error); ok {
+ r0 = rf()
+ } else {
+ r0 = ret.Error(0)
+ }
+
+ return r0
+}
+
+// GetMaxUserBalance provides a mock function with given fields: _a0
+func (_m *OnchainSubscriptions) GetMaxUserBalance(_a0 common.Address) (*big.Int, error) {
+ ret := _m.Called(_a0)
+
+ var r0 *big.Int
+ var r1 error
+ if rf, ok := ret.Get(0).(func(common.Address) (*big.Int, error)); ok {
+ return rf(_a0)
+ }
+ if rf, ok := ret.Get(0).(func(common.Address) *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(common.Address) error); ok {
+ r1 = rf(_a0)
+ } else {
+ r1 = ret.Error(1)
+ }
+
+ return r0, r1
+}
+
+// Start provides a mock function with given fields: _a0
+func (_m *OnchainSubscriptions) Start(_a0 context.Context) error {
+ ret := _m.Called(_a0)
+
+ var r0 error
+ if rf, ok := ret.Get(0).(func(context.Context) error); ok {
+ r0 = rf(_a0)
+ } else {
+ r0 = ret.Error(0)
+ }
+
+ return r0
+}
+
+type mockConstructorTestingTNewOnchainSubscriptions interface {
+ mock.TestingT
+ Cleanup(func())
+}
+
+// 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.
+func NewOnchainSubscriptions(t mockConstructorTestingTNewOnchainSubscriptions) *OnchainSubscriptions {
+ mock := &OnchainSubscriptions{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
diff --git a/core/services/gateway/handlers/functions/subscriptions.go b/core/services/gateway/handlers/functions/subscriptions.go
new file mode 100644
index 0000000000..181a98009f
--- /dev/null
+++ b/core/services/gateway/handlers/functions/subscriptions.go
@@ -0,0 +1,208 @@
+package functions
+
+import (
+ "context"
+ "fmt"
+ "math/big"
+ "sync"
+ "time"
+
+ "github.com/ethereum/go-ethereum/accounts/abi/bind"
+ "github.com/ethereum/go-ethereum/common"
+ "github.com/pkg/errors"
+
+ evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client"
+ "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_router"
+ "github.com/smartcontractkit/chainlink/v2/core/logger"
+ "github.com/smartcontractkit/chainlink/v2/core/services/job"
+ "github.com/smartcontractkit/chainlink/v2/core/utils"
+)
+
+type OnchainSubscriptionsConfig struct {
+ ContractAddress common.Address `json:"contractAddress"`
+ BlockConfirmations uint `json:"blockConfirmations"`
+ UpdateFrequencySec uint `json:"updateFrequencySec"`
+ UpdateTimeoutSec uint `json:"updateTimeoutSec"`
+ UpdateRangeSize uint `json:"updateRangeSize"`
+}
+
+// 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
+
+ // GetMaxUserBalance returns a maximum subscription balance (juels), or error if user has no subscriptions.
+ GetMaxUserBalance(common.Address) (*big.Int, error)
+}
+
+type onchainSubscriptions struct {
+ utils.StartStopOnce
+
+ config OnchainSubscriptionsConfig
+ subscriptions UserSubscriptions
+ client evmclient.Client
+ router *functions_router.FunctionsRouter
+ blockConfirmations *big.Int
+ lggr logger.Logger
+ closeWait sync.WaitGroup
+ rwMutex sync.RWMutex
+ stopCh utils.StopChan
+}
+
+func NewOnchainSubscriptions(client evmclient.Client, config OnchainSubscriptionsConfig, lggr logger.Logger) (OnchainSubscriptions, error) {
+ if client == nil {
+ return nil, errors.New("client is nil")
+ }
+ if lggr == nil {
+ return nil, errors.New("logger is nil")
+ }
+ router, err := functions_router.NewFunctionsRouter(config.ContractAddress, client)
+ if err != nil {
+ return nil, fmt.Errorf("unexpected error during functions_router.NewFunctionsRouter: %s", err)
+ }
+ return &onchainSubscriptions{
+ config: config,
+ subscriptions: NewUserSubscriptions(),
+ client: client,
+ router: router,
+ blockConfirmations: big.NewInt(int64(config.BlockConfirmations)),
+ lggr: lggr.Named("OnchainSubscriptions"),
+ stopCh: make(utils.StopChan),
+ }, nil
+}
+
+func (s *onchainSubscriptions) Start(ctx context.Context) error {
+ return s.StartOnce("OnchainSubscriptions", func() error {
+ s.lggr.Info("starting onchain subscriptions")
+ if s.config.UpdateFrequencySec == 0 {
+ return errors.New("OnchainSubscriptionsConfig.UpdateFrequencySec must be greater than 0")
+ }
+ if s.config.UpdateTimeoutSec == 0 {
+ return errors.New("OnchainSubscriptionsConfig.UpdateTimeoutSec must be greater than 0")
+ }
+ if s.config.UpdateRangeSize == 0 {
+ return errors.New("OnchainSubscriptionsConfig.UpdateRangeSize must be greater than 0")
+ }
+
+ s.closeWait.Add(1)
+ go s.queryLoop()
+
+ return nil
+ })
+}
+
+func (s *onchainSubscriptions) Close() error {
+ return s.StopOnce("OnchainSubscriptions", func() (err error) {
+ s.lggr.Info("closing onchain subscriptions")
+ close(s.stopCh)
+ s.closeWait.Wait()
+ return nil
+ })
+}
+
+func (s *onchainSubscriptions) GetMaxUserBalance(user common.Address) (*big.Int, error) {
+ s.rwMutex.RLock()
+ defer s.rwMutex.RUnlock()
+ return s.subscriptions.GetMaxUserBalance(user)
+}
+
+func (s *onchainSubscriptions) queryLoop() {
+ defer s.closeWait.Done()
+
+ ticker := time.NewTicker(time.Duration(s.config.UpdateFrequencySec) * time.Second)
+ defer ticker.Stop()
+
+ start := uint64(1)
+ lastKnownCount := uint64(0)
+
+ queryFunc := func() {
+ ctx, cancel := utils.ContextFromChanWithTimeout(s.stopCh, time.Duration(s.config.UpdateTimeoutSec)*time.Second)
+ defer cancel()
+
+ latestBlockHeight, err := s.client.LatestBlockHeight(ctx)
+ if err != nil || latestBlockHeight == nil {
+ s.lggr.Errorw("Error calling LatestBlockHeight", "err", err, "latestBlockHeight", latestBlockHeight.Int64())
+ return
+ }
+
+ blockNumber := big.NewInt(0).Sub(latestBlockHeight, s.blockConfirmations)
+
+ updateLastKnownCount := func() {
+ count, err := s.getSubscriptionsCount(ctx, blockNumber)
+ if err != nil {
+ s.lggr.Errorw("Error getting subscriptions count", "err", err)
+ return
+ }
+ s.lggr.Infow("Updated subscriptions count", "err", err, "count", count, "blockNumber", blockNumber.Int64())
+ lastKnownCount = count
+ }
+
+ if lastKnownCount == 0 {
+ updateLastKnownCount()
+ }
+ if lastKnownCount == 0 {
+ s.lggr.Info("Router has no subscriptions yet")
+ return
+ }
+
+ if start > lastKnownCount {
+ start = 1
+ }
+
+ end := start + uint64(s.config.UpdateRangeSize)
+ if end > lastKnownCount {
+ updateLastKnownCount()
+ if end > lastKnownCount {
+ end = lastKnownCount
+ }
+ }
+ if err := s.querySubscriptionsRange(ctx, blockNumber, start, end); err != nil {
+ s.lggr.Errorw("Error querying subscriptions", "err", err, "start", start, "end", end)
+ return
+ }
+
+ start = end + 1
+ }
+
+ queryFunc()
+
+ for {
+ select {
+ case <-s.stopCh:
+ return
+ case <-ticker.C:
+ queryFunc()
+ }
+ }
+}
+
+func (s *onchainSubscriptions) querySubscriptionsRange(ctx context.Context, blockNumber *big.Int, start, end uint64) error {
+ subscriptions, err := s.router.GetSubscriptionsInRange(&bind.CallOpts{
+ Pending: false,
+ BlockNumber: blockNumber,
+ Context: ctx,
+ }, start, end)
+ if err != nil {
+ return errors.Wrap(err, "unexpected error during functions_router.GetSubscriptionsInRange")
+ }
+
+ s.rwMutex.Lock()
+ defer s.rwMutex.Unlock()
+ for i, subscription := range subscriptions {
+ subscriptionId := start + uint64(i)
+ subscription := subscription
+ s.subscriptions.UpdateSubscription(subscriptionId, &subscription)
+ }
+
+ return nil
+}
+
+func (s *onchainSubscriptions) getSubscriptionsCount(ctx context.Context, blockNumber *big.Int) (uint64, error) {
+ return s.router.GetSubscriptionCount(&bind.CallOpts{
+ Pending: false,
+ BlockNumber: blockNumber,
+ Context: ctx,
+ })
+}
diff --git a/core/services/gateway/handlers/functions/subscriptions_test.go b/core/services/gateway/handlers/functions/subscriptions_test.go
new file mode 100644
index 0000000000..1e46bff5c0
--- /dev/null
+++ b/core/services/gateway/handlers/functions/subscriptions_test.go
@@ -0,0 +1,66 @@
+package functions_test
+
+import (
+ "math/big"
+ "testing"
+ "time"
+
+ "github.com/ethereum/go-ethereum"
+ "github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/common/hexutil"
+ "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+ "github.com/stretchr/testify/require"
+
+ "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/gateway/handlers/functions"
+)
+
+const (
+ validUser = "0x9ED925d8206a4f88a2f643b28B3035B315753Cd6"
+ invalidUser = "0x6E2dc0F9DB014aE19888F539E59285D2Ea04244C"
+)
+
+func TestSubscriptions(t *testing.T) {
+ t.Parallel()
+
+ getSubscriptionCount := hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000003")
+ getSubscriptionsInRange := hexutil.MustDecode("0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000109e6e1b12098cc8f3a1e9719a817ec53ab9b35c000000000000000000000000000000000000000000000000000034e23f515cb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f5340f0968ee8b7dfd97e3327a6139273cc2c4fa000000000000000000000000000000000000000000000001158e460913d000000000000000000000000000009ed925d8206a4f88a2f643b28b3035b315753cd60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001bc14b92364c75e20000000000000000000000009ed925d8206a4f88a2f643b28b3035b315753cd60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005439e5881a529f3ccbffc0e82d49f9db3950aefe")
+
+ ctx := testutils.Context(t)
+ client := mocks.NewClient(t)
+ client.On("LatestBlockHeight", mock.Anything).Return(big.NewInt(42), nil)
+ client.On("CallContract", mock.Anything, ethereum.CallMsg{ // getSubscriptionCount
+ To: &common.Address{},
+ Data: hexutil.MustDecode("0x66419970"),
+ }, mock.Anything).Return(getSubscriptionCount, nil)
+ client.On("CallContract", mock.Anything, ethereum.CallMsg{ // GetSubscriptionsInRange
+ To: &common.Address{},
+ Data: hexutil.MustDecode("0xec2454e500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003"),
+ }, mock.Anything).Return(getSubscriptionsInRange, nil)
+ config := functions.OnchainSubscriptionsConfig{
+ ContractAddress: common.Address{},
+ BlockConfirmations: 1,
+ UpdateFrequencySec: 1,
+ UpdateTimeoutSec: 1,
+ UpdateRangeSize: 10,
+ }
+ subscriptions, err := functions.NewOnchainSubscriptions(client, config, logger.TestLogger(t))
+ require.NoError(t, err)
+
+ err = subscriptions.Start(ctx)
+ require.NoError(t, err)
+ t.Cleanup(func() {
+ assert.NoError(t, subscriptions.Close())
+ })
+
+ gomega.NewGomegaWithT(t).Eventually(func() bool {
+ expectedBalance := big.NewInt(0).SetBytes(hexutil.MustDecode("0x01158e460913d00000"))
+ balance, err1 := subscriptions.GetMaxUserBalance(common.HexToAddress(validUser))
+ _, err2 := subscriptions.GetMaxUserBalance(common.HexToAddress(invalidUser))
+ return err1 == nil && err2 != nil && balance.Cmp(expectedBalance) == 0
+ }, testutils.WaitTimeout(t), time.Second).Should(gomega.BeTrue())
+}
diff --git a/core/services/gateway/handlers/functions/user_subscriptions.go b/core/services/gateway/handlers/functions/user_subscriptions.go
new file mode 100644
index 0000000000..c47ac8a4c9
--- /dev/null
+++ b/core/services/gateway/handlers/functions/user_subscriptions.go
@@ -0,0 +1,64 @@
+package functions
+
+import (
+ "math/big"
+
+ "github.com/ethereum/go-ethereum/common"
+ "github.com/pkg/errors"
+
+ "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_router"
+ "github.com/smartcontractkit/chainlink/v2/core/utils"
+)
+
+// Methods are NOT thread-safe.
+
+type UserSubscriptions interface {
+ UpdateSubscription(subscriptionId uint64, subscription *functions_router.IFunctionsSubscriptionsSubscription)
+ GetMaxUserBalance(user common.Address) (*big.Int, error)
+}
+
+type userSubscriptions struct {
+ userSubscriptionsMap map[common.Address]map[uint64]*functions_router.IFunctionsSubscriptionsSubscription
+ subscriptionIdsMap map[uint64]common.Address
+}
+
+func NewUserSubscriptions() UserSubscriptions {
+ return &userSubscriptions{
+ userSubscriptionsMap: make(map[common.Address]map[uint64]*functions_router.IFunctionsSubscriptionsSubscription),
+ subscriptionIdsMap: make(map[uint64]common.Address),
+ }
+}
+
+func (us *userSubscriptions) UpdateSubscription(subscriptionId uint64, subscription *functions_router.IFunctionsSubscriptionsSubscription) {
+ if subscription == nil || subscription.Owner == utils.ZeroAddress {
+ user, ok := us.subscriptionIdsMap[subscriptionId]
+ if ok {
+ delete(us.userSubscriptionsMap[user], subscriptionId)
+ if len(us.userSubscriptionsMap[user]) == 0 {
+ delete(us.userSubscriptionsMap, user)
+ }
+ }
+ delete(us.subscriptionIdsMap, subscriptionId)
+ } else {
+ us.subscriptionIdsMap[subscriptionId] = subscription.Owner
+ if _, ok := us.userSubscriptionsMap[subscription.Owner]; !ok {
+ us.userSubscriptionsMap[subscription.Owner] = make(map[uint64]*functions_router.IFunctionsSubscriptionsSubscription)
+ }
+ us.userSubscriptionsMap[subscription.Owner][subscriptionId] = subscription
+ }
+}
+
+func (us *userSubscriptions) GetMaxUserBalance(user common.Address) (*big.Int, error) {
+ subs, exists := us.userSubscriptionsMap[user]
+ if !exists {
+ return nil, errors.New("user has no subscriptions")
+ }
+
+ maxBalance := big.NewInt(0)
+ for _, sub := range subs {
+ if sub.Balance.Cmp(maxBalance) > 0 {
+ maxBalance = sub.Balance
+ }
+ }
+ return maxBalance, nil
+}
diff --git a/core/services/gateway/handlers/functions/user_subscriptions_test.go b/core/services/gateway/handlers/functions/user_subscriptions_test.go
new file mode 100644
index 0000000000..9e6a660ada
--- /dev/null
+++ b/core/services/gateway/handlers/functions/user_subscriptions_test.go
@@ -0,0 +1,77 @@
+package functions_test
+
+import (
+ "math/big"
+ "testing"
+
+ "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_router"
+ "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/functions"
+ "github.com/smartcontractkit/chainlink/v2/core/utils"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestUserSubscriptions(t *testing.T) {
+ t.Parallel()
+
+ us := functions.NewUserSubscriptions()
+
+ t.Run("GetMaxUserBalance for unknown user", func(t *testing.T) {
+ _, err := us.GetMaxUserBalance(utils.RandomAddress())
+ assert.Error(t, err)
+ })
+
+ t.Run("UpdateSubscription then GetMaxUserBalance", func(t *testing.T) {
+ user1 := utils.RandomAddress()
+ user1Balance := big.NewInt(10)
+ user2 := utils.RandomAddress()
+ user2Balance1 := big.NewInt(50)
+ user2Balance2 := big.NewInt(70)
+
+ us.UpdateSubscription(5, &functions_router.IFunctionsSubscriptionsSubscription{
+ Owner: user1,
+ Balance: user1Balance,
+ })
+ us.UpdateSubscription(3, &functions_router.IFunctionsSubscriptionsSubscription{
+ Owner: user2,
+ Balance: user2Balance1,
+ })
+ us.UpdateSubscription(10, &functions_router.IFunctionsSubscriptionsSubscription{
+ Owner: user2,
+ Balance: user2Balance2,
+ })
+
+ balance, err := us.GetMaxUserBalance(user1)
+ assert.NoError(t, err)
+ assert.Zero(t, balance.Cmp(user1Balance))
+
+ balance, err = us.GetMaxUserBalance(user2)
+ assert.NoError(t, err)
+ assert.Zero(t, balance.Cmp(user2Balance2))
+ })
+
+ t.Run("UpdateSubscription to remove subscriptions", func(t *testing.T) {
+ user2 := utils.RandomAddress()
+ user2Balance1 := big.NewInt(50)
+ user2Balance2 := big.NewInt(70)
+
+ us.UpdateSubscription(3, &functions_router.IFunctionsSubscriptionsSubscription{
+ Owner: user2,
+ Balance: user2Balance1,
+ })
+ us.UpdateSubscription(10, &functions_router.IFunctionsSubscriptionsSubscription{
+ Owner: user2,
+ Balance: user2Balance2,
+ })
+
+ us.UpdateSubscription(3, &functions_router.IFunctionsSubscriptionsSubscription{
+ Owner: utils.ZeroAddress,
+ })
+ us.UpdateSubscription(10, &functions_router.IFunctionsSubscriptionsSubscription{
+ Owner: utils.ZeroAddress,
+ })
+
+ _, err := us.GetMaxUserBalance(user2)
+ assert.Error(t, err)
+ })
+}
diff --git a/core/services/ocr2/plugins/functions/config/config.go b/core/services/ocr2/plugins/functions/config/config.go
index d373de5737..3f35d1dba9 100644
--- a/core/services/ocr2/plugins/functions/config/config.go
+++ b/core/services/ocr2/plugins/functions/config/config.go
@@ -10,6 +10,7 @@ import (
"github.com/smartcontractkit/libocr/offchainreporting2/types"
+ "github.com/smartcontractkit/chainlink/v2/core/assets"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/connector"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/common"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/functions"
@@ -19,27 +20,29 @@ import (
// This config is part of the job spec and is loaded only once on node boot/job creation.
type PluginConfig struct {
- EnableRequestSignatureCheck bool `json:"enableRequestSignatureCheck"`
- DONID string `json:"donID"`
- ContractVersion uint32 `json:"contractVersion"`
- MinIncomingConfirmations uint32 `json:"minIncomingConfirmations"`
- RequestTimeoutSec uint32 `json:"requestTimeoutSec"`
- RequestTimeoutCheckFrequencySec uint32 `json:"requestTimeoutCheckFrequencySec"`
- RequestTimeoutBatchLookupSize uint32 `json:"requestTimeoutBatchLookupSize"`
- PruneMaxStoredRequests uint32 `json:"pruneMaxStoredRequests"`
- PruneCheckFrequencySec uint32 `json:"pruneCheckFrequencySec"`
- PruneBatchSize uint32 `json:"pruneBatchSize"`
- ListenerEventHandlerTimeoutSec uint32 `json:"listenerEventHandlerTimeoutSec"`
- ListenerEventsCheckFrequencyMillis uint32 `json:"listenerEventsCheckFrequencyMillis"`
- ContractUpdateCheckFrequencySec uint32 `json:"contractUpdateCheckFrequencySec"`
- MaxRequestSizeBytes uint32 `json:"maxRequestSizeBytes"`
- MaxRequestSizesList []uint32 `json:"maxRequestSizesList"`
- MaxSecretsSizesList []uint32 `json:"maxSecretsSizesList"`
- GatewayConnectorConfig *connector.ConnectorConfig `json:"gatewayConnectorConfig"`
- OnchainAllowlist *functions.OnchainAllowlistConfig `json:"onchainAllowlist"`
- RateLimiter *common.RateLimiterConfig `json:"rateLimiter"`
- S4Constraints *s4.Constraints `json:"s4Constraints"`
- DecryptionQueueConfig *DecryptionQueueConfig `json:"decryptionQueueConfig"`
+ EnableRequestSignatureCheck bool `json:"enableRequestSignatureCheck"`
+ DONID string `json:"donID"`
+ ContractVersion uint32 `json:"contractVersion"`
+ MinIncomingConfirmations uint32 `json:"minIncomingConfirmations"`
+ RequestTimeoutSec uint32 `json:"requestTimeoutSec"`
+ RequestTimeoutCheckFrequencySec uint32 `json:"requestTimeoutCheckFrequencySec"`
+ RequestTimeoutBatchLookupSize uint32 `json:"requestTimeoutBatchLookupSize"`
+ PruneMaxStoredRequests uint32 `json:"pruneMaxStoredRequests"`
+ PruneCheckFrequencySec uint32 `json:"pruneCheckFrequencySec"`
+ PruneBatchSize uint32 `json:"pruneBatchSize"`
+ ListenerEventHandlerTimeoutSec uint32 `json:"listenerEventHandlerTimeoutSec"`
+ ListenerEventsCheckFrequencyMillis uint32 `json:"listenerEventsCheckFrequencyMillis"`
+ ContractUpdateCheckFrequencySec uint32 `json:"contractUpdateCheckFrequencySec"`
+ MaxRequestSizeBytes uint32 `json:"maxRequestSizeBytes"`
+ MaxRequestSizesList []uint32 `json:"maxRequestSizesList"`
+ MaxSecretsSizesList []uint32 `json:"maxSecretsSizesList"`
+ MinimumSubscriptionBalance assets.Link `json:"minimumSubscriptionBalance"`
+ GatewayConnectorConfig *connector.ConnectorConfig `json:"gatewayConnectorConfig"`
+ OnchainAllowlist *functions.OnchainAllowlistConfig `json:"onchainAllowlist"`
+ OnchainSubscriptions *functions.OnchainSubscriptionsConfig `json:"onchainSubscriptions"`
+ RateLimiter *common.RateLimiterConfig `json:"rateLimiter"`
+ S4Constraints *s4.Constraints `json:"s4Constraints"`
+ DecryptionQueueConfig *DecryptionQueueConfig `json:"decryptionQueueConfig"`
}
type DecryptionQueueConfig struct {
diff --git a/core/services/ocr2/plugins/functions/plugin.go b/core/services/ocr2/plugins/functions/plugin.go
index 3a13c0caba..b4040748e5 100644
--- a/core/services/ocr2/plugins/functions/plugin.go
+++ b/core/services/ocr2/plugins/functions/plugin.go
@@ -13,6 +13,7 @@ import (
"github.com/smartcontractkit/libocr/commontypes"
libocr2 "github.com/smartcontractkit/libocr/offchainreporting2plus"
+ "github.com/smartcontractkit/chainlink/v2/core/assets"
"github.com/smartcontractkit/chainlink/v2/core/bridges"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm"
"github.com/smartcontractkit/chainlink/v2/core/logger"
@@ -133,14 +134,18 @@ func NewFunctionsServices(functionsOracleArgs, thresholdOracleArgs, s4OracleArgs
if pluginConfig.GatewayConnectorConfig != nil && s4Storage != nil && pluginConfig.OnchainAllowlist != nil && pluginConfig.RateLimiter != nil {
allowlist, err2 := gwFunctions.NewOnchainAllowlist(conf.Chain.Client(), *pluginConfig.OnchainAllowlist, conf.Logger)
if err2 != nil {
- return nil, errors.Wrap(err, "failed to call NewOnchainAllowlist while creating a Functions Reporting Plugin")
+ return nil, errors.Wrap(err, "failed to create OnchainAllowlist")
}
rateLimiter, err2 := hc.NewRateLimiter(*pluginConfig.RateLimiter)
if err2 != nil {
return nil, errors.Wrap(err, "failed to create a RateLimiter")
}
+ subscriptions, err2 := gwFunctions.NewOnchainSubscriptions(conf.Chain.Client(), *pluginConfig.OnchainSubscriptions, conf.Logger)
+ if err2 != nil {
+ return nil, errors.Wrap(err, "failed to create a OnchainSubscriptions")
+ }
connectorLogger := conf.Logger.Named("GatewayConnector").With("jobName", conf.Job.PipelineSpec.JobName)
- connector, err2 := NewConnector(pluginConfig.GatewayConnectorConfig, conf.EthKeystore, conf.Chain.ID(), s4Storage, allowlist, rateLimiter, connectorLogger)
+ connector, err2 := NewConnector(pluginConfig.GatewayConnectorConfig, conf.EthKeystore, conf.Chain.ID(), s4Storage, allowlist, rateLimiter, subscriptions, pluginConfig.MinimumSubscriptionBalance, connectorLogger)
if err2 != nil {
return nil, errors.Wrap(err, "failed to create a GatewayConnector")
}
@@ -167,7 +172,7 @@ func NewFunctionsServices(functionsOracleArgs, thresholdOracleArgs, s4OracleArgs
return allServices, nil
}
-func NewConnector(gwcCfg *connector.ConnectorConfig, ethKeystore keystore.Eth, chainID *big.Int, s4Storage s4.Storage, allowlist gwFunctions.OnchainAllowlist, rateLimiter *hc.RateLimiter, lggr logger.Logger) (connector.GatewayConnector, error) {
+func NewConnector(gwcCfg *connector.ConnectorConfig, ethKeystore keystore.Eth, chainID *big.Int, s4Storage s4.Storage, allowlist gwFunctions.OnchainAllowlist, rateLimiter *hc.RateLimiter, subscriptions gwFunctions.OnchainSubscriptions, minimumBalance assets.Link, lggr logger.Logger) (connector.GatewayConnector, error) {
enabledKeys, err := ethKeystore.EnabledKeysForChain(chainID)
if err != nil {
return nil, err
@@ -180,7 +185,7 @@ func NewConnector(gwcCfg *connector.ConnectorConfig, ethKeystore keystore.Eth, c
signerKey := enabledKeys[idx].ToEcdsaPrivKey()
nodeAddress := enabledKeys[idx].ID()
- handler, err := functions.NewFunctionsConnectorHandler(nodeAddress, signerKey, s4Storage, allowlist, rateLimiter, lggr)
+ handler, err := functions.NewFunctionsConnectorHandler(nodeAddress, signerKey, s4Storage, allowlist, rateLimiter, subscriptions, minimumBalance, lggr)
if err != nil {
return nil, err
}
diff --git a/core/services/ocr2/plugins/functions/plugin_test.go b/core/services/ocr2/plugins/functions/plugin_test.go
index 6b1e6f6e4c..2e35672e92 100644
--- a/core/services/ocr2/plugins/functions/plugin_test.go
+++ b/core/services/ocr2/plugins/functions/plugin_test.go
@@ -8,6 +8,7 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
+ "github.com/smartcontractkit/chainlink/v2/core/assets"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/connector"
hc "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/common"
@@ -31,10 +32,11 @@ func TestNewConnector_Success(t *testing.T) {
ethKeystore := ksmocks.NewEth(t)
s4Storage := s4mocks.NewStorage(t)
allowlist := gfmocks.NewOnchainAllowlist(t)
+ subscriptions := gfmocks.NewOnchainSubscriptions(t)
rateLimiter, err := hc.NewRateLimiter(hc.RateLimiterConfig{GlobalRPS: 100.0, GlobalBurst: 100, PerSenderRPS: 100.0, PerSenderBurst: 100})
require.NoError(t, err)
ethKeystore.On("EnabledKeysForChain", mock.Anything).Return([]ethkey.KeyV2{keyV2}, nil)
- _, err = functions.NewConnector(gwcCfg, ethKeystore, chainID, s4Storage, allowlist, rateLimiter, logger.TestLogger(t))
+ _, err = functions.NewConnector(gwcCfg, ethKeystore, chainID, s4Storage, allowlist, rateLimiter, subscriptions, *assets.NewLinkFromJuels(0), logger.TestLogger(t))
require.NoError(t, err)
}
@@ -53,9 +55,10 @@ func TestNewConnector_NoKeyForConfiguredAddress(t *testing.T) {
ethKeystore := ksmocks.NewEth(t)
s4Storage := s4mocks.NewStorage(t)
allowlist := gfmocks.NewOnchainAllowlist(t)
+ subscriptions := gfmocks.NewOnchainSubscriptions(t)
rateLimiter, err := hc.NewRateLimiter(hc.RateLimiterConfig{GlobalRPS: 100.0, GlobalBurst: 100, PerSenderRPS: 100.0, PerSenderBurst: 100})
require.NoError(t, err)
ethKeystore.On("EnabledKeysForChain", mock.Anything).Return([]ethkey.KeyV2{{Address: common.HexToAddress(addresses[1])}}, nil)
- _, err = functions.NewConnector(gwcCfg, ethKeystore, chainID, s4Storage, allowlist, rateLimiter, logger.TestLogger(t))
+ _, err = functions.NewConnector(gwcCfg, ethKeystore, chainID, s4Storage, allowlist, rateLimiter, subscriptions, *assets.NewLinkFromJuels(0), logger.TestLogger(t))
require.Error(t, err)
}
From 78c82148351a51f97d422e6b8fdcdbf223f4d50c Mon Sep 17 00:00:00 2001
From: Adam Hamrick
Date: Mon, 18 Sep 2023 12:22:16 -0400
Subject: [PATCH 09/31] Enables Us to Skip More Tests (#10678)
---
.github/workflows/ci-core.yml | 12 ++++++++++++
.github/workflows/integration-tests.yml | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml
index 46df80db4a..7b96f46915 100644
--- a/.github/workflows/ci-core.yml
+++ b/.github/workflows/ci-core.yml
@@ -56,10 +56,16 @@ jobs:
split-packages:
name: Split Go Tests
+ if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }}
runs-on: ubuntu-latest
outputs:
splits: ${{ steps.split.outputs.splits }}
steps:
+ - name: Check for Skip Tests Label
+ if: contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests')
+ run: |
+ echo "## \`skip-smoke-tests\` label is active, skipping E2E smoke tests" >>$GITHUB_STEP_SUMMARY
+ exit 0
- name: Checkout the repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Setup Go
@@ -290,11 +296,17 @@ jobs:
clean:
name: Clean Go Tidy & Generate
+ if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
+ - name: Check for Skip Tests Label
+ if: contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests')
+ run: |
+ echo "## \`skip-smoke-tests\` label is active, skipping E2E smoke tests" >>$GITHUB_STEP_SUMMARY
+ exit 0
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index 43ace19d4c..a51f1c6997 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -107,7 +107,7 @@ jobs:
- name: Print Chainlink Image Built
if: needs.changes.outputs.src == 'true'
run: |
- echo "### chainlink node image tag used for this test run :link:" >>$GITHUB_STEP_SUMMARY
+ echo "### Chainlink node image tag used for this test run :link:" >>$GITHUB_STEP_SUMMARY
echo "\`${GITHUB_SHA}\`" >>$GITHUB_STEP_SUMMARY
build-test-image:
From aadc46778049728730f447f44267f7ec8de3b9a6 Mon Sep 17 00:00:00 2001
From: Ilja Pavlovs
Date: Mon, 18 Sep 2023 20:50:34 +0300
Subject: [PATCH 10/31] Chore/vrf 585 add ctf test vrfv2plus migration (#10450)
* fix VRF V3 setup script
* VRF-585: add VRFV2Plus CTF test for migration
* VRF-585: add VRFV2Plus Coordinator with onMigration method
* VRF-585: reverting VRFV2PlusClient contract changes
* remove unnecessary deregister (#10487)
* VRF-585: adding new steps
* VRF-585: updating VRFConsumerBaseV2Plus.sol to have public coordinator; and VRFV2PlusLoadTestWithMetrics.sol to use that coordinator
* VRF-585: update
* set s_consumers in onMigration()
* VRF-585: updating test
* VRF-585: updating test
* VRF-585: updating test
* VRF-585: fixing solidity lint issues
* VRF-585: removing code from upgraded coordinator in order to resolve max code size exceeded issue
* VRF-585: changing MinimumConfirmations
* VRF-585: enable CL Client debug
* VRF-585: reusing env for the test
* VRF-585: disabling CL node http debug mode
* VRF-585: enabling back waitforevents for contract deployment
* VRF-585: add err checks
* VRF-585: add total balance verification
* VRF-585: refactoring test; updating Coordinator contract to update subIds array when migrating
* VRF-585: removing commented code
* VRF-585: reverting
---------
Co-authored-by: Makram
Co-authored-by: jinhoonbang
---
contracts/scripts/native_solc_compile_all_vrf | 1 +
.../v0.8/dev/vrf/VRFConsumerBaseV2Plus.sol | 2 +-
.../VRFCoordinatorV2PlusUpgradedVersion.sol | 722 ++++
.../VRFV2PlusLoadTestWithMetrics.sol | 8 +-
.../vrf_malicious_consumer_v2_plus.go | 28 +-
.../vrf_v2plus_load_test_with_metrics.go | 52 +-
.../vrf_v2plus_single_consumer.go | 28 +-
.../vrf_v2plus_sub_owner.go | 28 +-
.../vrf_v2plus_upgraded_version.go | 3667 +++++++++++++++++
.../vrfv2plus_client/vrfv2plus_client.go | 2 +-
.../vrfv2plus_consumer_example.go | 28 +-
.../vrfv2plus_reverting_example.go | 28 +-
.../vrfv2plus_wrapper/vrfv2plus_wrapper.go | 28 +-
...rapper-dependency-versions-do-not-edit.txt | 17 +-
core/gethwrappers/go_generate.go | 1 +
.../vrfv2plus_constants/constants.go | 6 +
.../actions/vrfv2plus/vrfv2plus_models.go | 18 +-
.../actions/vrfv2plus/vrfv2plus_steps.go | 469 ++-
.../contracts/contract_deployer.go | 1 +
.../contracts/contract_vrf_models.go | 45 +-
.../contracts/ethereum_vrfv2plus_contracts.go | 398 +-
integration-tests/smoke/vrfv2plus_test.go | 256 +-
22 files changed, 5602 insertions(+), 231 deletions(-)
create mode 100644 contracts/src/v0.8/dev/vrf/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol
create mode 100644 core/gethwrappers/generated/vrf_v2plus_upgraded_version/vrf_v2plus_upgraded_version.go
diff --git a/contracts/scripts/native_solc_compile_all_vrf b/contracts/scripts/native_solc_compile_all_vrf
index feebbdcf14..9c142a805c 100755
--- a/contracts/scripts/native_solc_compile_all_vrf
+++ b/contracts/scripts/native_solc_compile_all_vrf
@@ -71,6 +71,7 @@ compileContract dev/vrf/libraries/VRFV2PlusClient.sol
compileContract dev/vrf/testhelpers/VRFCoordinatorV2Plus_V2Example.sol
compileContract dev/vrf/TrustedBlockhashStore.sol
compileContract dev/vrf/testhelpers/VRFV2PlusLoadTestWithMetrics.sol
+compileContractAltOpts dev/vrf/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol 5
# VRF V2 Wrapper
compileContract vrf/VRFV2Wrapper.sol
diff --git a/contracts/src/v0.8/dev/vrf/VRFConsumerBaseV2Plus.sol b/contracts/src/v0.8/dev/vrf/VRFConsumerBaseV2Plus.sol
index ed1f918212..5220f1c151 100644
--- a/contracts/src/v0.8/dev/vrf/VRFConsumerBaseV2Plus.sol
+++ b/contracts/src/v0.8/dev/vrf/VRFConsumerBaseV2Plus.sol
@@ -103,7 +103,7 @@ abstract contract VRFConsumerBaseV2Plus is IVRFMigratableConsumerV2Plus, Confirm
error OnlyOwnerOrCoordinator(address have, address owner, address coordinator);
error ZeroAddress();
- IVRFMigratableCoordinatorV2Plus internal s_vrfCoordinator;
+ IVRFMigratableCoordinatorV2Plus public s_vrfCoordinator;
/**
* @param _vrfCoordinator address of VRFCoordinator contract
diff --git a/contracts/src/v0.8/dev/vrf/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol b/contracts/src/v0.8/dev/vrf/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol
new file mode 100644
index 0000000000..5e059a067a
--- /dev/null
+++ b/contracts/src/v0.8/dev/vrf/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol
@@ -0,0 +1,722 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.4;
+
+import "../../../shared/interfaces/LinkTokenInterface.sol";
+import "../../../interfaces/BlockhashStoreInterface.sol";
+import "../../../interfaces/TypeAndVersionInterface.sol";
+import "../../interfaces/IVRFCoordinatorV2Plus.sol";
+import "../../../vrf/VRF.sol";
+import "../VRFConsumerBaseV2Plus.sol";
+import "../../../ChainSpecificUtil.sol";
+import "../SubscriptionAPI.sol";
+import "../libraries/VRFV2PlusClient.sol";
+import "../../interfaces/IVRFCoordinatorV2PlusMigration.sol";
+import "../../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol";
+
+contract VRFCoordinatorV2PlusUpgradedVersion is
+ VRF,
+ SubscriptionAPI,
+ IVRFCoordinatorV2PlusMigration,
+ IVRFMigratableCoordinatorV2Plus
+{
+ using EnumerableSet for EnumerableSet.UintSet;
+ /// @dev should always be available
+ BlockhashStoreInterface public immutable BLOCKHASH_STORE;
+
+ // Set this maximum to 200 to give us a 56 block window to fulfill
+ // the request before requiring the block hash feeder.
+ uint16 public constant MAX_REQUEST_CONFIRMATIONS = 200;
+ uint32 public constant MAX_NUM_WORDS = 500;
+ // 5k is plenty for an EXTCODESIZE call (2600) + warm CALL (100)
+ // and some arithmetic operations.
+ uint256 private constant GAS_FOR_CALL_EXACT_CHECK = 5_000;
+ error InvalidRequestConfirmations(uint16 have, uint16 min, uint16 max);
+ error GasLimitTooBig(uint32 have, uint32 want);
+ error NumWordsTooBig(uint32 have, uint32 want);
+ error ProvingKeyAlreadyRegistered(bytes32 keyHash);
+ error NoSuchProvingKey(bytes32 keyHash);
+ error InvalidLinkWeiPrice(int256 linkWei);
+ error InsufficientGasForConsumer(uint256 have, uint256 want);
+ error NoCorrespondingRequest();
+ error IncorrectCommitment();
+ error BlockhashNotInStore(uint256 blockNum);
+ error PaymentTooLarge();
+ error InvalidExtraArgsTag();
+ /// @notice emitted when version in the request doesn't match expected version
+ error InvalidVersion(uint8 requestVersion, uint8 expectedVersion);
+ /// @notice emitted when transferred balance (msg.value) does not match the metadata in V1MigrationData
+ error InvalidNativeBalance(uint256 transferredValue, uint96 expectedValue);
+ error SubscriptionIDCollisionFound();
+
+ struct RequestCommitment {
+ uint64 blockNum;
+ uint256 subId;
+ uint32 callbackGasLimit;
+ uint32 numWords;
+ address sender;
+ bytes extraArgs;
+ }
+
+ mapping(bytes32 => address) /* keyHash */ /* oracle */ public s_provingKeys;
+ bytes32[] public s_provingKeyHashes;
+ mapping(uint256 => bytes32) /* requestID */ /* commitment */ public s_requestCommitments;
+
+ event ProvingKeyRegistered(bytes32 keyHash, address indexed oracle);
+ event RandomWordsRequested(
+ bytes32 indexed keyHash,
+ uint256 requestId,
+ uint256 preSeed,
+ uint256 indexed subId,
+ uint16 minimumRequestConfirmations,
+ uint32 callbackGasLimit,
+ uint32 numWords,
+ bytes extraArgs,
+ address indexed sender
+ );
+ event RandomWordsFulfilled(
+ uint256 indexed requestId,
+ uint256 outputSeed,
+ uint256 indexed subID,
+ uint96 payment,
+ bool success
+ );
+
+ int256 public s_fallbackWeiPerUnitLink;
+
+ FeeConfig public s_feeConfig;
+
+ struct FeeConfig {
+ // Flat fee charged per fulfillment in millionths of link
+ // So fee range is [0, 2^32/10^6].
+ uint32 fulfillmentFlatFeeLinkPPM;
+ // Flat fee charged per fulfillment in millionths of eth.
+ // So fee range is [0, 2^32/10^6].
+ uint32 fulfillmentFlatFeeEthPPM;
+ }
+
+ event ConfigSet(
+ uint16 minimumRequestConfirmations,
+ uint32 maxGasLimit,
+ uint32 stalenessSeconds,
+ uint32 gasAfterPaymentCalculation,
+ int256 fallbackWeiPerUnitLink,
+ FeeConfig feeConfig
+ );
+
+ constructor(address blockhashStore) SubscriptionAPI() {
+ BLOCKHASH_STORE = BlockhashStoreInterface(blockhashStore);
+ }
+
+ /**
+ * @notice Registers a proving key to an oracle.
+ * @param oracle address of the oracle
+ * @param publicProvingKey key that oracle can use to submit vrf fulfillments
+ */
+ function registerProvingKey(address oracle, uint256[2] calldata publicProvingKey) external onlyOwner {
+ bytes32 kh = hashOfKey(publicProvingKey);
+ if (s_provingKeys[kh] != address(0)) {
+ revert ProvingKeyAlreadyRegistered(kh);
+ }
+ s_provingKeys[kh] = oracle;
+ s_provingKeyHashes.push(kh);
+ emit ProvingKeyRegistered(kh, oracle);
+ }
+
+ /**
+ * @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) {
+ return keccak256(abi.encode(publicKey));
+ }
+
+ /**
+ * @notice Sets the configuration of the vrfv2 coordinator
+ * @param minimumRequestConfirmations global min for request confirmations
+ * @param maxGasLimit global max for request gas limit
+ * @param stalenessSeconds if the eth/link feed is more stale then this, use the fallback price
+ * @param gasAfterPaymentCalculation gas used in doing accounting after completing the gas measurement
+ * @param fallbackWeiPerUnitLink fallback eth/link price in the case of a stale feed
+ * @param feeConfig fee configuration
+ */
+ function setConfig(
+ uint16 minimumRequestConfirmations,
+ uint32 maxGasLimit,
+ uint32 stalenessSeconds,
+ uint32 gasAfterPaymentCalculation,
+ int256 fallbackWeiPerUnitLink,
+ FeeConfig memory feeConfig
+ ) external onlyOwner {
+ if (minimumRequestConfirmations > MAX_REQUEST_CONFIRMATIONS) {
+ revert InvalidRequestConfirmations(
+ minimumRequestConfirmations,
+ minimumRequestConfirmations,
+ MAX_REQUEST_CONFIRMATIONS
+ );
+ }
+ if (fallbackWeiPerUnitLink <= 0) {
+ revert InvalidLinkWeiPrice(fallbackWeiPerUnitLink);
+ }
+ s_config = Config({
+ minimumRequestConfirmations: minimumRequestConfirmations,
+ maxGasLimit: maxGasLimit,
+ stalenessSeconds: stalenessSeconds,
+ gasAfterPaymentCalculation: gasAfterPaymentCalculation,
+ reentrancyLock: false
+ });
+ s_feeConfig = feeConfig;
+ s_fallbackWeiPerUnitLink = fallbackWeiPerUnitLink;
+ emit ConfigSet(
+ minimumRequestConfirmations,
+ maxGasLimit,
+ stalenessSeconds,
+ gasAfterPaymentCalculation,
+ fallbackWeiPerUnitLink,
+ s_feeConfig
+ );
+ }
+
+ /**
+ * @notice Get configuration relevant for making requests
+ * @return minimumRequestConfirmations global min for request confirmations
+ * @return maxGasLimit global max for request gas limit
+ * @return s_provingKeyHashes list of registered key hashes
+ */
+ function getRequestConfig() external view returns (uint16, uint32, bytes32[] memory) {
+ return (s_config.minimumRequestConfirmations, s_config.maxGasLimit, s_provingKeyHashes);
+ }
+
+ /// @dev Convert the extra args bytes into a struct
+ /// @param extraArgs The extra args bytes
+ /// @return The extra args struct
+ function _fromBytes(bytes calldata extraArgs) internal pure returns (VRFV2PlusClient.ExtraArgsV1 memory) {
+ if (extraArgs.length == 0) {
+ return VRFV2PlusClient.ExtraArgsV1({nativePayment: false});
+ }
+ if (bytes4(extraArgs) != VRFV2PlusClient.EXTRA_ARGS_V1_TAG) revert InvalidExtraArgsTag();
+ return abi.decode(extraArgs[4:], (VRFV2PlusClient.ExtraArgsV1));
+ }
+
+ /**
+ * @notice Request a set of random words.
+ * @param req - a struct containing following fiels for randomness request:
+ * keyHash - Corresponds to a particular oracle job which uses
+ * that key for generating the VRF proof. Different keyHash's have different gas price
+ * ceilings, so you can select a specific one to bound your maximum per request cost.
+ * subId - The ID of the VRF subscription. Must be funded
+ * with the minimum subscription balance required for the selected keyHash.
+ * requestConfirmations - How many blocks you'd like the
+ * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
+ * for why you may want to request more. The acceptable range is
+ * [minimumRequestBlockConfirmations, 200].
+ * callbackGasLimit - How much gas you'd like to receive in your
+ * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
+ * may be slightly less than this amount because of gas used calling the function
+ * (argument decoding etc.), so you may need to request slightly more than you expect
+ * to have inside fulfillRandomWords. The acceptable range is
+ * [0, maxGasLimit]
+ * numWords - The number of uint256 random values you'd like to receive
+ * in your fulfillRandomWords callback. Note these numbers are expanded in a
+ * secure way by the VRFCoordinator from a single random value supplied by the oracle.
+ * extraArgs - Encoded extra arguments that has a boolean flag for whether payment
+ * should be made in ETH or LINK. Payment in LINK is only available if the LINK token is available to this contract.
+ * @return requestId - A unique identifier of the request. Can be used to match
+ * a request to a response in fulfillRandomWords.
+ */
+ function requestRandomWords(
+ VRFV2PlusClient.RandomWordsRequest calldata req
+ ) external override nonReentrant returns (uint256) {
+ // Input validation using the subscription storage.
+ if (s_subscriptionConfigs[req.subId].owner == address(0)) {
+ revert InvalidSubscription();
+ }
+ // Its important to ensure that the consumer is in fact who they say they
+ // are, otherwise they could use someone else's subscription balance.
+ // A nonce of 0 indicates consumer is not allocated to the sub.
+ uint64 currentNonce = s_consumers[msg.sender][req.subId];
+ if (currentNonce == 0) {
+ revert InvalidConsumer(req.subId, msg.sender);
+ }
+ // Input validation using the config storage word.
+ if (
+ req.requestConfirmations < s_config.minimumRequestConfirmations ||
+ req.requestConfirmations > MAX_REQUEST_CONFIRMATIONS
+ ) {
+ revert InvalidRequestConfirmations(
+ req.requestConfirmations,
+ s_config.minimumRequestConfirmations,
+ MAX_REQUEST_CONFIRMATIONS
+ );
+ }
+ // No lower bound on the requested gas limit. A user could request 0
+ // and they would simply be billed for the proof verification and wouldn't be
+ // able to do anything with the random value.
+ if (req.callbackGasLimit > s_config.maxGasLimit) {
+ revert GasLimitTooBig(req.callbackGasLimit, s_config.maxGasLimit);
+ }
+ if (req.numWords > MAX_NUM_WORDS) {
+ revert NumWordsTooBig(req.numWords, MAX_NUM_WORDS);
+ }
+ // Note we do not check whether the keyHash is valid to save gas.
+ // The consequence for users is that they can send requests
+ // for invalid keyHashes which will simply not be fulfilled.
+ uint64 nonce = currentNonce + 1;
+ (uint256 requestId, uint256 preSeed) = computeRequestId(req.keyHash, msg.sender, req.subId, nonce);
+
+ VRFV2PlusClient.ExtraArgsV1 memory extraArgs = _fromBytes(req.extraArgs);
+ bytes memory extraArgsBytes = VRFV2PlusClient._argsToBytes(extraArgs);
+ s_requestCommitments[requestId] = keccak256(
+ abi.encode(
+ requestId,
+ ChainSpecificUtil.getBlockNumber(),
+ req.subId,
+ req.callbackGasLimit,
+ req.numWords,
+ msg.sender,
+ extraArgsBytes
+ )
+ );
+ emit RandomWordsRequested(
+ req.keyHash,
+ requestId,
+ preSeed,
+ req.subId,
+ req.requestConfirmations,
+ req.callbackGasLimit,
+ req.numWords,
+ extraArgsBytes,
+ msg.sender
+ );
+ s_consumers[msg.sender][req.subId] = nonce;
+
+ return requestId;
+ }
+
+ function computeRequestId(
+ bytes32 keyHash,
+ address sender,
+ uint256 subId,
+ uint64 nonce
+ ) internal pure returns (uint256, uint256) {
+ uint256 preSeed = uint256(keccak256(abi.encode(keyHash, sender, subId, nonce)));
+ return (uint256(keccak256(abi.encode(keyHash, preSeed))), preSeed);
+ }
+
+ /**
+ * @dev calls target address with exactly gasAmount gas and data as calldata
+ * or reverts if at least gasAmount gas is not available.
+ */
+ function callWithExactGas(uint256 gasAmount, address target, bytes memory data) private returns (bool success) {
+ // solhint-disable-next-line no-inline-assembly
+ assembly {
+ let g := gas()
+ // Compute g -= GAS_FOR_CALL_EXACT_CHECK and check for underflow
+ // The gas actually passed to the callee is min(gasAmount, 63//64*gas available).
+ // We want to ensure that we revert if gasAmount > 63//64*gas available
+ // as we do not want to provide them with less, however that check itself costs
+ // gas. GAS_FOR_CALL_EXACT_CHECK ensures we have at least enough gas to be able
+ // to revert if gasAmount > 63//64*gas available.
+ if lt(g, GAS_FOR_CALL_EXACT_CHECK) {
+ revert(0, 0)
+ }
+ g := sub(g, GAS_FOR_CALL_EXACT_CHECK)
+ // 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 and return whether we succeeded. ignore return data
+ // call(gas,addr,value,argsOffset,argsLength,retOffset,retLength)
+ success := call(gasAmount, target, 0, add(data, 0x20), mload(data), 0, 0)
+ }
+ return success;
+ }
+
+ struct Output {
+ bytes32 keyHash;
+ uint256 requestId;
+ uint256 randomness;
+ }
+
+ function getRandomnessFromProof(
+ Proof memory proof,
+ RequestCommitment memory rc
+ ) internal view returns (Output memory) {
+ bytes32 keyHash = hashOfKey(proof.pk);
+ // Only registered proving keys are permitted.
+ address oracle = s_provingKeys[keyHash];
+ if (oracle == address(0)) {
+ revert NoSuchProvingKey(keyHash);
+ }
+ uint256 requestId = uint256(keccak256(abi.encode(keyHash, proof.seed)));
+ bytes32 commitment = s_requestCommitments[requestId];
+ if (commitment == 0) {
+ revert NoCorrespondingRequest();
+ }
+ if (
+ commitment !=
+ keccak256(abi.encode(requestId, rc.blockNum, rc.subId, rc.callbackGasLimit, rc.numWords, rc.sender, rc.extraArgs))
+ ) {
+ revert IncorrectCommitment();
+ }
+
+ bytes32 blockHash = ChainSpecificUtil.getBlockhash(rc.blockNum);
+ if (blockHash == bytes32(0)) {
+ blockHash = BLOCKHASH_STORE.getBlockhash(rc.blockNum);
+ if (blockHash == bytes32(0)) {
+ revert BlockhashNotInStore(rc.blockNum);
+ }
+ }
+
+ // The seed actually used by the VRF machinery, mixing in the blockhash
+ uint256 actualSeed = uint256(keccak256(abi.encodePacked(proof.seed, blockHash)));
+ uint256 randomness = VRF.randomValueFromVRFProof(proof, actualSeed); // Reverts on failure
+ return Output(keyHash, requestId, randomness);
+ }
+
+ /*
+ * @notice Fulfill a randomness request
+ * @param proof contains the proof and randomness
+ * @param rc request commitment pre-image, committed to at request time
+ * @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) {
+ uint256 startGas = gasleft();
+ Output memory output = getRandomnessFromProof(proof, rc);
+
+ uint256[] memory randomWords = new uint256[](rc.numWords);
+ for (uint256 i = 0; i < rc.numWords; i++) {
+ randomWords[i] = uint256(keccak256(abi.encode(output.randomness, i)));
+ }
+
+ delete s_requestCommitments[output.requestId];
+ VRFConsumerBaseV2Plus v;
+ bytes memory resp = abi.encodeWithSelector(v.rawFulfillRandomWords.selector, output.requestId, randomWords);
+ // Call with explicitly the amount of callback gas requested
+ // Important to not let them exhaust the gas budget and avoid oracle payment.
+ // Do not allow any non-view/non-pure coordinator functions to be called
+ // during the consumers callback code via reentrancyLock.
+ // Note that callWithExactGas will revert if we do not have sufficient gas
+ // to give the callee their requested amount.
+ s_config.reentrancyLock = true;
+ bool success = callWithExactGas(rc.callbackGasLimit, rc.sender, resp);
+ s_config.reentrancyLock = false;
+
+ // Increment the req count for the subscription.
+ uint64 reqCount = s_subscriptions[rc.subId].reqCount;
+ s_subscriptions[rc.subId].reqCount = reqCount + 1;
+
+ // stack too deep error
+ {
+ bool nativePayment = uint8(rc.extraArgs[rc.extraArgs.length - 1]) == 1;
+ // We want to charge users exactly for how much gas they use in their callback.
+ // The gasAfterPaymentCalculation is meant to cover these additional operations where we
+ // decrement the subscription balance and increment the oracles withdrawable balance.
+ uint96 payment = calculatePaymentAmount(
+ startGas,
+ s_config.gasAfterPaymentCalculation,
+ tx.gasprice,
+ nativePayment
+ );
+ if (nativePayment) {
+ if (s_subscriptions[rc.subId].ethBalance < payment) {
+ revert InsufficientBalance();
+ }
+ s_subscriptions[rc.subId].ethBalance -= payment;
+ s_withdrawableEth[s_provingKeys[output.keyHash]] += payment;
+ } else {
+ if (s_subscriptions[rc.subId].balance < payment) {
+ revert InsufficientBalance();
+ }
+ s_subscriptions[rc.subId].balance -= payment;
+ s_withdrawableTokens[s_provingKeys[output.keyHash]] += payment;
+ }
+
+ // Include payment in the event for tracking costs.
+ // event RandomWordsFulfilled(uint256 indexed requestId, uint256 outputSeed, uint96 payment, bytes extraArgs, bool success);
+ emit RandomWordsFulfilled(output.requestId, output.randomness, rc.subId, payment, success);
+
+ return payment;
+ }
+ }
+
+ function calculatePaymentAmount(
+ uint256 startGas,
+ uint256 gasAfterPaymentCalculation,
+ uint256 weiPerUnitGas,
+ bool nativePayment
+ ) internal view returns (uint96) {
+ if (nativePayment) {
+ return
+ calculatePaymentAmountEth(
+ startGas,
+ gasAfterPaymentCalculation,
+ s_feeConfig.fulfillmentFlatFeeEthPPM,
+ weiPerUnitGas
+ );
+ }
+ return
+ calculatePaymentAmountLink(
+ startGas,
+ gasAfterPaymentCalculation,
+ s_feeConfig.fulfillmentFlatFeeLinkPPM,
+ weiPerUnitGas
+ );
+ }
+
+ function calculatePaymentAmountEth(
+ uint256 startGas,
+ uint256 gasAfterPaymentCalculation,
+ uint32 fulfillmentFlatFeePPM,
+ uint256 weiPerUnitGas
+ ) internal view returns (uint96) {
+ // Will return non-zero on chains that have this enabled
+ uint256 l1CostWei = ChainSpecificUtil.getCurrentTxL1GasFees();
+ // calculate the payment without the premium
+ uint256 baseFeeWei = weiPerUnitGas * (gasAfterPaymentCalculation + startGas - gasleft());
+ // calculate the flat fee in wei
+ uint256 flatFeeWei = 1e12 * uint256(fulfillmentFlatFeePPM);
+ // return the final fee with the flat fee and l1 cost (if applicable) added
+ return uint96(baseFeeWei + flatFeeWei + l1CostWei);
+ }
+
+ // Get the amount of gas used for fulfillment
+ function calculatePaymentAmountLink(
+ uint256 startGas,
+ uint256 gasAfterPaymentCalculation,
+ uint32 fulfillmentFlatFeeLinkPPM,
+ uint256 weiPerUnitGas
+ ) internal view returns (uint96) {
+ int256 weiPerUnitLink;
+ weiPerUnitLink = getFeedData();
+ if (weiPerUnitLink <= 0) {
+ revert InvalidLinkWeiPrice(weiPerUnitLink);
+ }
+ // Will return non-zero on chains that have this enabled
+ uint256 l1CostWei = ChainSpecificUtil.getCurrentTxL1GasFees();
+ // (1e18 juels/link) ((wei/gas * gas) + l1wei) / (wei/link) = juels
+ uint256 paymentNoFee = (1e18 * (weiPerUnitGas * (gasAfterPaymentCalculation + startGas - gasleft()) + l1CostWei)) /
+ uint256(weiPerUnitLink);
+ uint256 fee = 1e12 * uint256(fulfillmentFlatFeeLinkPPM);
+ if (paymentNoFee > (1e27 - fee)) {
+ revert PaymentTooLarge(); // Payment + fee cannot be more than all of the link in existence.
+ }
+ return uint96(paymentNoFee + fee);
+ }
+
+ function getFeedData() private view returns (int256) {
+ uint32 stalenessSeconds = s_config.stalenessSeconds;
+ bool staleFallback = stalenessSeconds > 0;
+ uint256 timestamp;
+ int256 weiPerUnitLink;
+ (, weiPerUnitLink, , timestamp, ) = LINK_ETH_FEED.latestRoundData();
+ // solhint-disable-next-line not-rely-on-time
+ if (staleFallback && stalenessSeconds < block.timestamp - timestamp) {
+ weiPerUnitLink = s_fallbackWeiPerUnitLink;
+ }
+ return weiPerUnitLink;
+ }
+
+ /*
+ * @notice Check to see if there exists a request commitment consumers
+ * for all consumers and keyhashes for a given sub.
+ * @param subId - ID of the subscription
+ * @return true if there exists at least one unfulfilled request for the subscription, false
+ * otherwise.
+ * @dev Looping is bounded to MAX_CONSUMERS*(number of keyhashes).
+ * @dev Used to disable subscription canceling while outstanding request are present.
+ */
+ function pendingRequestExists(uint256 subId) public view returns (bool) {
+ SubscriptionConfig memory subConfig = s_subscriptionConfigs[subId];
+ for (uint256 i = 0; i < subConfig.consumers.length; i++) {
+ for (uint256 j = 0; j < s_provingKeyHashes.length; j++) {
+ (uint256 reqId, ) = computeRequestId(
+ s_provingKeyHashes[j],
+ subConfig.consumers[i],
+ subId,
+ s_consumers[subConfig.consumers[i]][subId]
+ );
+ if (s_requestCommitments[reqId] != 0) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @inheritdoc IVRFSubscriptionV2Plus
+ */
+ function removeConsumer(uint256 subId, address consumer) external override onlySubOwner(subId) nonReentrant {
+ if (pendingRequestExists(subId)) {
+ revert PendingRequestExists();
+ }
+ if (s_consumers[consumer][subId] == 0) {
+ 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];
+ // Storage write to preserve last element
+ s_subscriptionConfigs[subId].consumers[i] = last;
+ // Storage remove last element
+ s_subscriptionConfigs[subId].consumers.pop();
+ break;
+ }
+ }
+ delete s_consumers[consumer][subId];
+ emit SubscriptionConsumerRemoved(subId, consumer);
+ }
+
+ /**
+ * @inheritdoc IVRFSubscriptionV2Plus
+ */
+ function cancelSubscription(uint256 subId, address to) external override onlySubOwner(subId) nonReentrant {
+ if (pendingRequestExists(subId)) {
+ revert PendingRequestExists();
+ }
+ cancelSubscriptionHelper(subId, to);
+ }
+
+ /***************************************************************************
+ * Section: Migration
+ ***************************************************************************/
+
+ address[] internal s_migrationTargets;
+
+ /// @dev Emitted when new coordinator is registered as migratable target
+ event CoordinatorRegistered(address coordinatorAddress);
+
+ /// @notice emitted when migration to new coordinator completes successfully
+ /// @param newCoordinator coordinator address after migration
+ /// @param subId subscription ID
+ event MigrationCompleted(address newCoordinator, uint256 subId);
+
+ /// @notice emitted when migrate() is called and given coordinator is not registered as migratable target
+ error CoordinatorNotRegistered(address coordinatorAddress);
+
+ /// @notice emitted when migrate() is called and given coordinator is registered as migratable target
+ error CoordinatorAlreadyRegistered(address coordinatorAddress);
+
+ /// @dev encapsulates data to be migrated from current coordinator
+ struct V1MigrationData {
+ uint8 fromVersion;
+ uint256 subId;
+ address subOwner;
+ address[] consumers;
+ uint96 linkBalance;
+ uint96 ethBalance;
+ }
+
+ function isTargetRegistered(address target) internal view returns (bool) {
+ for (uint256 i = 0; i < s_migrationTargets.length; i++) {
+ if (s_migrationTargets[i] == target) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ function registerMigratableCoordinator(address target) external onlyOwner {
+ if (isTargetRegistered(target)) {
+ revert CoordinatorAlreadyRegistered(target);
+ }
+ s_migrationTargets.push(target);
+ emit CoordinatorRegistered(target);
+ }
+
+ function migrate(uint256 subId, address newCoordinator) external nonReentrant {
+ if (!isTargetRegistered(newCoordinator)) {
+ revert CoordinatorNotRegistered(newCoordinator);
+ }
+ (uint96 balance, uint96 ethBalance, , address owner, address[] memory consumers) = getSubscription(subId);
+ require(owner == msg.sender, "Not subscription owner");
+ require(!pendingRequestExists(subId), "Pending request exists");
+
+ V1MigrationData memory migrationData = V1MigrationData({
+ fromVersion: migrationVersion(),
+ subId: subId,
+ subOwner: owner,
+ consumers: consumers,
+ linkBalance: balance,
+ ethBalance: ethBalance
+ });
+ bytes memory encodedData = abi.encode(migrationData);
+ deleteSubscription(subId);
+ IVRFCoordinatorV2PlusMigration(newCoordinator).onMigration{value: ethBalance}(encodedData);
+
+ // Only transfer LINK if the token is active and there is a balance.
+ if (address(LINK) != address(0) && balance != 0) {
+ require(LINK.transfer(address(newCoordinator), balance), "insufficient funds");
+ }
+
+ // 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++) {
+ IVRFMigratableConsumerV2Plus(consumers[i]).setCoordinator(newCoordinator);
+ }
+ s_config.reentrancyLock = false;
+
+ emit MigrationCompleted(newCoordinator, subId);
+ }
+
+ function migrationVersion() public pure returns (uint8 version) {
+ return 1;
+ }
+
+ /**
+ * @inheritdoc IVRFCoordinatorV2PlusMigration
+ */
+ function onMigration(bytes calldata encodedData) external payable override {
+ V1MigrationData memory migrationData = abi.decode(encodedData, (V1MigrationData));
+
+ if (migrationData.fromVersion != 1) {
+ revert InvalidVersion(migrationData.fromVersion, 1);
+ }
+
+ if (msg.value != uint256(migrationData.ethBalance)) {
+ revert InvalidNativeBalance(msg.value, migrationData.ethBalance);
+ }
+
+ // it should be impossible to have a subscription id collision, for two reasons:
+ // 1. the subscription ID is calculated using inputs that cannot be replicated under different
+ // conditions.
+ // 2. once a subscription is migrated it is deleted from the previous coordinator, so it cannot
+ // be migrated again.
+ // however, we should have this check here in case the `migrate` function on
+ // future coordinators "forgets" to delete subscription data allowing re-migration of the same
+ // subscription.
+ if (s_subscriptionConfigs[migrationData.subId].owner != address(0)) {
+ revert SubscriptionIDCollisionFound();
+ }
+
+ for (uint i = 0; i < migrationData.consumers.length; i++) {
+ s_consumers[migrationData.consumers[i]][migrationData.subId] = 1;
+ }
+
+ s_subscriptions[migrationData.subId] = Subscription({
+ ethBalance: migrationData.ethBalance,
+ balance: migrationData.linkBalance,
+ reqCount: 0
+ });
+ s_subscriptionConfigs[migrationData.subId] = SubscriptionConfig({
+ owner: migrationData.subOwner,
+ consumers: migrationData.consumers,
+ requestedOwner: address(0)
+ });
+
+ s_totalBalance += uint96(migrationData.linkBalance);
+ s_totalEthBalance += uint96(migrationData.ethBalance);
+
+ s_subIds.add(migrationData.subId);
+ }
+}
diff --git a/contracts/src/v0.8/dev/vrf/testhelpers/VRFV2PlusLoadTestWithMetrics.sol b/contracts/src/v0.8/dev/vrf/testhelpers/VRFV2PlusLoadTestWithMetrics.sol
index f2879333dc..42296ae6bf 100644
--- a/contracts/src/v0.8/dev/vrf/testhelpers/VRFV2PlusLoadTestWithMetrics.sol
+++ b/contracts/src/v0.8/dev/vrf/testhelpers/VRFV2PlusLoadTestWithMetrics.sol
@@ -11,8 +11,6 @@ import "../../../shared/access/ConfirmedOwner.sol";
* @notice Allows making many VRF V2 randomness requests in a single transaction for load testing.
*/
contract VRFV2PlusLoadTestWithMetrics is VRFConsumerBaseV2Plus {
- IVRFCoordinatorV2Plus public immutable COORDINATOR;
-
uint256 public s_responseCount;
uint256 public s_requestCount;
uint256 public s_averageFulfillmentInMillions = 0; // in millions for better precision
@@ -32,9 +30,7 @@ contract VRFV2PlusLoadTestWithMetrics is VRFConsumerBaseV2Plus {
mapping(uint256 => RequestStatus) /* requestId */ /* requestStatus */ public s_requests;
- constructor(address _vrfCoordinator) VRFConsumerBaseV2Plus(_vrfCoordinator) {
- COORDINATOR = IVRFCoordinatorV2Plus(_vrfCoordinator);
- }
+ constructor(address _vrfCoordinator) VRFConsumerBaseV2Plus(_vrfCoordinator) {}
function fulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) internal override {
uint256 fulfilmentBlockNumber = ChainSpecificUtil.getBlockNumber();
@@ -76,7 +72,7 @@ contract VRFV2PlusLoadTestWithMetrics is VRFConsumerBaseV2Plus {
extraArgs: VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: _nativePayment}))
});
// Will revert if subscription is not funded.
- uint256 requestId = COORDINATOR.requestRandomWords(req);
+ uint256 requestId = s_vrfCoordinator.requestRandomWords(req);
s_lastRequestId = requestId;
uint256 requestBlockNumber = ChainSpecificUtil.getBlockNumber();
diff --git a/core/gethwrappers/generated/vrf_malicious_consumer_v2_plus/vrf_malicious_consumer_v2_plus.go b/core/gethwrappers/generated/vrf_malicious_consumer_v2_plus/vrf_malicious_consumer_v2_plus.go
index e13d1b48d5..4b71dfd50b 100644
--- a/core/gethwrappers/generated/vrf_malicious_consumer_v2_plus/vrf_malicious_consumer_v2_plus.go
+++ b/core/gethwrappers/generated/vrf_malicious_consumer_v2_plus/vrf_malicious_consumer_v2_plus.go
@@ -31,8 +31,8 @@ var (
)
var VRFMaliciousConsumerV2PlusMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"requestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_gasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
- Bin: "0x60806040523480156200001157600080fd5b5060405162001201380380620012018339810160408190526200003491620001cc565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000103565b5050600280546001600160a01b03199081166001600160a01b0394851617909155600580548216958416959095179094555060068054909316911617905562000204565b6001600160a01b0381163314156200015e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001c757600080fd5b919050565b60008060408385031215620001e057600080fd5b620001eb83620001af565b9150620001fb60208401620001af565b90509250929050565b610fed80620002146000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80638ea9811711610081578063f08c5daa1161005b578063f08c5daa1461017b578063f2fde38b14610184578063f6eaffc81461019757600080fd5b80638ea981171461014c578063cf62c8ab1461015f578063e89e106a1461017257600080fd5b80635e3b709f116100b25780635e3b709f146100f657806379ba50971461011c5780638da5cb5b1461012457600080fd5b80631fe543e3146100ce57806336bfffed146100e3575b600080fd5b6100e16100dc366004610cc1565b6101aa565b005b6100e16100f1366004610bc9565b610230565b610109610104366004610c8f565b610368565b6040519081526020015b60405180910390f35b6100e161045e565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610113565b6100e161015a366004610bae565b61055b565b6100e161016d366004610d65565b610666565b61010960045481565b61010960075481565b6100e1610192366004610bae565b61086c565b6101096101a5366004610c8f565b610880565b60025473ffffffffffffffffffffffffffffffffffffffff163314610222576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b61022c82826108a1565b5050565b600854610299576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f7420736574000000000000000000000000000000000000006044820152606401610219565b60005b815181101561022c57600554600854835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c91908590859081106102df576102df610f82565b60200260200101516040518363ffffffff1660e01b815260040161032392919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b15801561033d57600080fd5b505af1158015610351573d6000803e3d6000fd5b50505050808061036090610f22565b91505061029c565b60098190556040805160c08101825282815260085460208083019190915260018284018190526207a1206060840152608083015282519081018352600080825260a083019190915260055492517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90610405908490600401610e4a565b602060405180830381600087803b15801561041f57600080fd5b505af1158015610433573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104579190610ca8565b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146104df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610219565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff16331480159061059b575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561061f57336105c060005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610219565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60085461079e57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156106d757600080fd5b505af11580156106eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070f9190610ca8565b60088190556005546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b15801561078557600080fd5b505af1158015610799573d6000803e3d6000fd5b505050505b6006546005546008546040805160208082019390935281518082039093018352808201918290527f4000aea00000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09361081a93911691869190604401610dfe565b602060405180830381600087803b15801561083457600080fd5b505af1158015610848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022c9190610c6d565b6108746109ac565b61087d81610a2f565b50565b6003818154811061089057600080fd5b600091825260209091200154905081565b5a60075580516108b8906003906020840190610b25565b5060048281556040805160c0810182526009548152600854602080830191909152600182840181905262030d4060608401526080830152825190810183526000815260a082015260055491517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff90921691639b1c385e9161095491859101610e4a565b602060405180830381600087803b15801561096e57600080fd5b505af1158015610982573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a69190610ca8565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610219565b565b73ffffffffffffffffffffffffffffffffffffffff8116331415610aaf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610219565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610b60579160200282015b82811115610b60578251825591602001919060010190610b45565b50610b6c929150610b70565b5090565b5b80821115610b6c5760008155600101610b71565b803573ffffffffffffffffffffffffffffffffffffffff81168114610ba957600080fd5b919050565b600060208284031215610bc057600080fd5b61045782610b85565b60006020808385031215610bdc57600080fd5b823567ffffffffffffffff811115610bf357600080fd5b8301601f81018513610c0457600080fd5b8035610c17610c1282610efe565b610eaf565b80828252848201915084840188868560051b8701011115610c3757600080fd5b600094505b83851015610c6157610c4d81610b85565b835260019490940193918501918501610c3c565b50979650505050505050565b600060208284031215610c7f57600080fd5b8151801515811461045757600080fd5b600060208284031215610ca157600080fd5b5035919050565b600060208284031215610cba57600080fd5b5051919050565b60008060408385031215610cd457600080fd5b8235915060208084013567ffffffffffffffff811115610cf357600080fd5b8401601f81018613610d0457600080fd5b8035610d12610c1282610efe565b80828252848201915084840189868560051b8701011115610d3257600080fd5b600094505b83851015610d55578035835260019490940193918501918501610d37565b5080955050505050509250929050565b600060208284031215610d7757600080fd5b81356bffffffffffffffffffffffff8116811461045757600080fd5b6000815180845260005b81811015610db957602081850181015186830182015201610d9d565b81811115610dcb576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff83166020820152606060408201526000610e416060830184610d93565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c080840152610ea760e0840182610d93565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610ef657610ef6610fb1565b604052919050565b600067ffffffffffffffff821115610f1857610f18610fb1565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f7b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a",
+ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"requestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_gasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFMigratableCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ Bin: "0x60806040523480156200001157600080fd5b5060405162001243380380620012438339810160408190526200003491620001cc565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000103565b5050600280546001600160a01b03199081166001600160a01b0394851617909155600580548216958416959095179094555060068054909316911617905562000204565b6001600160a01b0381163314156200015e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001c757600080fd5b919050565b60008060408385031215620001e057600080fd5b620001eb83620001af565b9150620001fb60208401620001af565b90509250929050565b61102f80620002146000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80639eccacf611610081578063f08c5daa1161005b578063f08c5daa146101bd578063f2fde38b146101c6578063f6eaffc8146101d957600080fd5b80639eccacf614610181578063cf62c8ab146101a1578063e89e106a146101b457600080fd5b806379ba5097116100b257806379ba5097146101275780638da5cb5b1461012f5780638ea981171461016e57600080fd5b80631fe543e3146100d957806336bfffed146100ee5780635e3b709f14610101575b600080fd5b6100ec6100e7366004610d03565b6101ec565b005b6100ec6100fc366004610c0b565b610272565b61011461010f366004610cd1565b6103aa565b6040519081526020015b60405180910390f35b6100ec6104a0565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011e565b6100ec61017c366004610bf0565b61059d565b6002546101499073ffffffffffffffffffffffffffffffffffffffff1681565b6100ec6101af366004610da7565b6106a8565b61011460045481565b61011460075481565b6100ec6101d4366004610bf0565b6108ae565b6101146101e7366004610cd1565b6108c2565b60025473ffffffffffffffffffffffffffffffffffffffff163314610264576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b61026e82826108e3565b5050565b6008546102db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f742073657400000000000000000000000000000000000000604482015260640161025b565b60005b815181101561026e57600554600854835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c919085908590811061032157610321610fc4565b60200260200101516040518363ffffffff1660e01b815260040161036592919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b15801561037f57600080fd5b505af1158015610393573d6000803e3d6000fd5b5050505080806103a290610f64565b9150506102de565b60098190556040805160c08101825282815260085460208083019190915260018284018190526207a1206060840152608083015282519081018352600080825260a083019190915260055492517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90610447908490600401610e8c565b602060405180830381600087803b15801561046157600080fd5b505af1158015610475573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104999190610cea565b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610521576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161025b565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906105dd575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610661573361060260005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161025b565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6008546107e057600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561071957600080fd5b505af115801561072d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107519190610cea565b60088190556005546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b1580156107c757600080fd5b505af11580156107db573d6000803e3d6000fd5b505050505b6006546005546008546040805160208082019390935281518082039093018352808201918290527f4000aea00000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09361085c93911691869190604401610e40565b602060405180830381600087803b15801561087657600080fd5b505af115801561088a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026e9190610caf565b6108b66109ee565b6108bf81610a71565b50565b600381815481106108d257600080fd5b600091825260209091200154905081565b5a60075580516108fa906003906020840190610b67565b5060048281556040805160c0810182526009548152600854602080830191909152600182840181905262030d4060608401526080830152825190810183526000815260a082015260055491517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff90921691639b1c385e9161099691859101610e8c565b602060405180830381600087803b1580156109b057600080fd5b505af11580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e89190610cea565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161025b565b565b73ffffffffffffffffffffffffffffffffffffffff8116331415610af1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161025b565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610ba2579160200282015b82811115610ba2578251825591602001919060010190610b87565b50610bae929150610bb2565b5090565b5b80821115610bae5760008155600101610bb3565b803573ffffffffffffffffffffffffffffffffffffffff81168114610beb57600080fd5b919050565b600060208284031215610c0257600080fd5b61049982610bc7565b60006020808385031215610c1e57600080fd5b823567ffffffffffffffff811115610c3557600080fd5b8301601f81018513610c4657600080fd5b8035610c59610c5482610f40565b610ef1565b80828252848201915084840188868560051b8701011115610c7957600080fd5b600094505b83851015610ca357610c8f81610bc7565b835260019490940193918501918501610c7e565b50979650505050505050565b600060208284031215610cc157600080fd5b8151801515811461049957600080fd5b600060208284031215610ce357600080fd5b5035919050565b600060208284031215610cfc57600080fd5b5051919050565b60008060408385031215610d1657600080fd5b8235915060208084013567ffffffffffffffff811115610d3557600080fd5b8401601f81018613610d4657600080fd5b8035610d54610c5482610f40565b80828252848201915084840189868560051b8701011115610d7457600080fd5b600094505b83851015610d97578035835260019490940193918501918501610d79565b5080955050505050509250929050565b600060208284031215610db957600080fd5b81356bffffffffffffffffffffffff8116811461049957600080fd5b6000815180845260005b81811015610dfb57602081850181015186830182015201610ddf565b81811115610e0d576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff83166020820152606060408201526000610e836060830184610dd5565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c080840152610ee960e0840182610dd5565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610f3857610f38610ff3565b604052919050565b600067ffffffffffffffff821115610f5a57610f5a610ff3565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610fbd577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a",
}
var VRFMaliciousConsumerV2PlusABI = VRFMaliciousConsumerV2PlusMetaData.ABI
@@ -259,6 +259,28 @@ func (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2PlusCallerSession) SReq
return _VRFMaliciousConsumerV2Plus.Contract.SRequestId(&_VRFMaliciousConsumerV2Plus.CallOpts)
}
+func (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2PlusCaller) SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _VRFMaliciousConsumerV2Plus.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 (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2PlusSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFMaliciousConsumerV2Plus.Contract.SVrfCoordinator(&_VRFMaliciousConsumerV2Plus.CallOpts)
+}
+
+func (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2PlusCallerSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFMaliciousConsumerV2Plus.Contract.SVrfCoordinator(&_VRFMaliciousConsumerV2Plus.CallOpts)
+}
+
func (_VRFMaliciousConsumerV2Plus *VRFMaliciousConsumerV2PlusTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
return _VRFMaliciousConsumerV2Plus.contract.Transact(opts, "acceptOwnership")
}
@@ -648,6 +670,8 @@ type VRFMaliciousConsumerV2PlusInterface interface {
SRequestId(opts *bind.CallOpts) (*big.Int, error)
+ SVrfCoordinator(opts *bind.CallOpts) (common.Address, error)
+
AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error)
CreateSubscriptionAndFund(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error)
diff --git a/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics/vrf_v2plus_load_test_with_metrics.go b/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics/vrf_v2plus_load_test_with_metrics.go
index 96f767d511..1c3b30895a 100644
--- a/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics/vrf_v2plus_load_test_with_metrics.go
+++ b/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics/vrf_v2plus_load_test_with_metrics.go
@@ -31,8 +31,8 @@ var (
)
var VRFV2PlusLoadTestWithMetricsMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"COORDINATOR\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"}],\"name\":\"getRequestStatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_nativePayment\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestCount\",\"type\":\"uint16\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_averageFulfillmentInMillions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fastestFulfillment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requests\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_responseCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_slowestFulfillment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
- Bin: "0x60a0604052600060055560006006556103e760075534801561002057600080fd5b5060405161139238038061139283398101604081905261003f916101a9565b8033806000816100965760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156100c6576100c6816100ff565b5050600280546001600160a01b0319166001600160a01b0393909316929092179091555060601b6001600160601b0319166080526101d9565b6001600160a01b0381163314156101585760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161008d565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156101bb57600080fd5b81516001600160a01b03811681146101d257600080fd5b9392505050565b60805160601c6111946101fe6000396000818161013b01526103f701526111946000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d826f88f11610066578063d826f88f1461025d578063d8a4676f1461027c578063dc1670db146102a1578063f2fde38b146102aa57600080fd5b80638da5cb5b146101b85780638ea98117146101d6578063a168fa89146101e9578063b1e217491461025457600080fd5b80636846de20116100d35780636846de201461018b578063737144bc1461019e57806374dba124146101a757806379ba5097146101b057600080fd5b80631757f11c146101055780631fe543e3146101215780633b2bcbf114610136578063557d2e9214610182575b600080fd5b61010e60065481565b6040519081526020015b60405180910390f35b61013461012f366004610d8d565b6102bd565b005b61015d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b61010e60045481565b610134610199366004610e7c565b610343565b61010e60055481565b61010e60075481565b61013461058c565b60005473ffffffffffffffffffffffffffffffffffffffff1661015d565b6101346101e4366004610d1e565b610689565b61022a6101f7366004610d5b565b600a602052600090815260409020805460028201546003830154600484015460059094015460ff90931693919290919085565b6040805195151586526020860194909452928401919091526060830152608082015260a001610118565b61010e60085481565b6101346000600581905560068190556103e76007556004819055600355565b61028f61028a366004610d5b565b610794565b60405161011896959493929190610efb565b61010e60035481565b6101346102b8366004610d1e565b610879565b60025473ffffffffffffffffffffffffffffffffffffffff163314610335576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b61033f828261088d565b5050565b61034b6109b8565b60005b8161ffff168161ffff1610156105825760006040518060c001604052808881526020018a81526020018961ffff1681526020018763ffffffff1681526020018563ffffffff1681526020016103b26040518060200160405280891515815250610a3b565b90526040517f9b1c385e00000000000000000000000000000000000000000000000000000000815290915060009073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690639b1c385e9061042c908590600401610f67565b602060405180830381600087803b15801561044657600080fd5b505af115801561045a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047e9190610d74565b60088190559050600061048f610af7565b6040805160c08101825260008082528251818152602080820185528084019182524284860152606084018390526080840186905260a08401839052878352600a815293909120825181547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016901515178155905180519495509193909261051d926001850192910190610c93565b506040820151600282015560608201516003820155608082015160048083019190915560a090920151600590910155805490600061055a836110f0565b909155505060009182526009602052604090912055508061057a816110ce565b91505061034e565b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461060d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161032c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906106c9575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561074d57336106ee60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161032c565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000818152600a60209081526040808320815160c081018352815460ff161515815260018201805484518187028101870190955280855260609587958695869586958695919492938584019390929083018282801561081257602002820191906000526020600020905b8154815260200190600101908083116107fe575b505050505081526020016002820154815260200160038201548152602001600482015481526020016005820154815250509050806000015181602001518260400151836060015184608001518560a001519650965096509650965096505091939550919395565b6108816109b8565b61088a81610b9d565b50565b6000610897610af7565b600084815260096020526040812054919250906108b490836110b7565b905060006108c582620f424061107a565b90506006548211156108d75760068290555b60075482106108e8576007546108ea565b815b6007556003546108fa578061092d565b600354610908906001611027565b81600354600554610919919061107a565b6109239190611027565b61092d919061103f565b6005556000858152600a6020908152604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081178255865161097f939290910191870190610c93565b506000858152600a602052604081204260038083019190915560059091018590558054916109ac836110f0565b91905055505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161032c565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401610a7491511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b60004661a4b1811480610b0c575062066eed81145b15610b9657606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5857600080fd5b505afa158015610b6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b909190610d74565b91505090565b4391505090565b73ffffffffffffffffffffffffffffffffffffffff8116331415610c1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161032c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610cce579160200282015b82811115610cce578251825591602001919060010190610cb3565b50610cda929150610cde565b5090565b5b80821115610cda5760008155600101610cdf565b803561ffff81168114610d0557600080fd5b919050565b803563ffffffff81168114610d0557600080fd5b600060208284031215610d3057600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610d5457600080fd5b9392505050565b600060208284031215610d6d57600080fd5b5035919050565b600060208284031215610d8657600080fd5b5051919050565b60008060408385031215610da057600080fd5b8235915060208084013567ffffffffffffffff80821115610dc057600080fd5b818601915086601f830112610dd457600080fd5b813581811115610de657610de6611158565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108582111715610e2957610e29611158565b604052828152858101935084860182860187018b1015610e4857600080fd5b600095505b83861015610e6b578035855260019590950194938601938601610e4d565b508096505050505050509250929050565b600080600080600080600060e0888a031215610e9757600080fd5b87359650610ea760208901610cf3565b955060408801359450610ebc60608901610d0a565b935060808801358015158114610ed157600080fd5b9250610edf60a08901610d0a565b9150610eed60c08901610cf3565b905092959891949750929550565b600060c082018815158352602060c08185015281895180845260e086019150828b01935060005b81811015610f3e57845183529383019391830191600101610f22565b505060408501989098525050506060810193909352608083019190915260a09091015292915050565b6000602080835283518184015280840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b81811015610fde5782810184015186820161010001528301610fc1565b81811115610ff157600061010083880101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169390930161010001949350505050565b6000821982111561103a5761103a611129565b500190565b600082611075577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156110b2576110b2611129565b500290565b6000828210156110c9576110c9611129565b500390565b600061ffff808316818114156110e6576110e6611129565b6001019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561112257611122611129565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a",
+ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"}],\"name\":\"getRequestStatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"_nativePayment\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestCount\",\"type\":\"uint16\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_averageFulfillmentInMillions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fastestFulfillment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requests\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"requestTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fulfilmentBlockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_responseCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_slowestFulfillment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFMigratableCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ Bin: "0x6080604052600060055560006006556103e760075534801561002057600080fd5b5060405161134738038061134783398101604081905261003f9161019b565b8033806000816100965760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156100c6576100c6816100f1565b5050600280546001600160a01b0319166001600160a01b039390931692909217909155506101cb9050565b6001600160a01b03811633141561014a5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161008d565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156101ad57600080fd5b81516001600160a01b03811681146101c457600080fd5b9392505050565b61116d806101da6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638ea9811711610097578063d826f88f11610066578063d826f88f14610252578063d8a4676f14610271578063dc1670db14610296578063f2fde38b1461029f57600080fd5b80638ea98117146101ab5780639eccacf6146101be578063a168fa89146101de578063b1e217491461024957600080fd5b8063737144bc116100d3578063737144bc1461015257806374dba1241461015b57806379ba5097146101645780638da5cb5b1461016c57600080fd5b80631757f11c146101055780631fe543e314610121578063557d2e92146101365780636846de201461013f575b600080fd5b61010e60065481565b6040519081526020015b60405180910390f35b61013461012f366004610d66565b6102b2565b005b61010e60045481565b61013461014d366004610e55565b610338565b61010e60055481565b61010e60075481565b610134610565565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610118565b6101346101b9366004610cf7565b610662565b6002546101869073ffffffffffffffffffffffffffffffffffffffff1681565b61021f6101ec366004610d34565b600a602052600090815260409020805460028201546003830154600484015460059094015460ff90931693919290919085565b6040805195151586526020860194909452928401919091526060830152608082015260a001610118565b61010e60085481565b6101346000600581905560068190556103e76007556004819055600355565b61028461027f366004610d34565b61076d565b60405161011896959493929190610ed4565b61010e60035481565b6101346102ad366004610cf7565b610852565b60025473ffffffffffffffffffffffffffffffffffffffff16331461032a576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6103348282610866565b5050565b610340610991565b60005b8161ffff168161ffff16101561055b5760006040518060c001604052808881526020018a81526020018961ffff1681526020018763ffffffff1681526020018563ffffffff1681526020016103a76040518060200160405280891515815250610a14565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90610405908590600401610f40565b602060405180830381600087803b15801561041f57600080fd5b505af1158015610433573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104579190610d4d565b600881905590506000610468610ad0565b6040805160c08101825260008082528251818152602080820185528084019182524284860152606084018390526080840186905260a08401839052878352600a815293909120825181547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690151517815590518051949550919390926104f6926001850192910190610c6c565b506040820151600282015560608201516003820155608082015160048083019190915560a0909201516005909101558054906000610533836110c9565b9091555050600091825260096020526040909120555080610553816110a7565b915050610343565b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146105e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610321565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906106a2575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561072657336106c760005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610321565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000818152600a60209081526040808320815160c081018352815460ff16151581526001820180548451818702810187019095528085526060958795869586958695869591949293858401939092908301828280156107eb57602002820191906000526020600020905b8154815260200190600101908083116107d7575b505050505081526020016002820154815260200160038201548152602001600482015481526020016005820154815250509050806000015181602001518260400151836060015184608001518560a001519650965096509650965096505091939550919395565b61085a610991565b61086381610b76565b50565b6000610870610ad0565b6000848152600960205260408120549192509061088d9083611090565b9050600061089e82620f4240611053565b90506006548211156108b05760068290555b60075482106108c1576007546108c3565b815b6007556003546108d35780610906565b6003546108e1906001611000565b816003546005546108f29190611053565b6108fc9190611000565b6109069190611018565b6005556000858152600a6020908152604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811782558651610958939290910191870190610c6c565b506000858152600a60205260408120426003808301919091556005909101859055805491610985836110c9565b91905055505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610321565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401610a4d91511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b60004661a4b1811480610ae5575062066eed81145b15610b6f57606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b3157600080fd5b505afa158015610b45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b699190610d4d565b91505090565b4391505090565b73ffffffffffffffffffffffffffffffffffffffff8116331415610bf6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610321565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610ca7579160200282015b82811115610ca7578251825591602001919060010190610c8c565b50610cb3929150610cb7565b5090565b5b80821115610cb35760008155600101610cb8565b803561ffff81168114610cde57600080fd5b919050565b803563ffffffff81168114610cde57600080fd5b600060208284031215610d0957600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610d2d57600080fd5b9392505050565b600060208284031215610d4657600080fd5b5035919050565b600060208284031215610d5f57600080fd5b5051919050565b60008060408385031215610d7957600080fd5b8235915060208084013567ffffffffffffffff80821115610d9957600080fd5b818601915086601f830112610dad57600080fd5b813581811115610dbf57610dbf611131565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108582111715610e0257610e02611131565b604052828152858101935084860182860187018b1015610e2157600080fd5b600095505b83861015610e44578035855260019590950194938601938601610e26565b508096505050505050509250929050565b600080600080600080600060e0888a031215610e7057600080fd5b87359650610e8060208901610ccc565b955060408801359450610e9560608901610ce3565b935060808801358015158114610eaa57600080fd5b9250610eb860a08901610ce3565b9150610ec660c08901610ccc565b905092959891949750929550565b600060c082018815158352602060c08185015281895180845260e086019150828b01935060005b81811015610f1757845183529383019391830191600101610efb565b505060408501989098525050506060810193909352608083019190915260a09091015292915050565b6000602080835283518184015280840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b81811015610fb75782810184015186820161010001528301610f9a565b81811115610fca57600061010083880101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169390930161010001949350505050565b6000821982111561101357611013611102565b500190565b60008261104e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561108b5761108b611102565b500290565b6000828210156110a2576110a2611102565b500390565b600061ffff808316818114156110bf576110bf611102565b6001019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156110fb576110fb611102565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a",
}
var VRFV2PlusLoadTestWithMetricsABI = VRFV2PlusLoadTestWithMetricsMetaData.ABI
@@ -171,28 +171,6 @@ func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsTransactorRaw)
return _VRFV2PlusLoadTestWithMetrics.Contract.contract.Transact(opts, method, params...)
}
-func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCaller) COORDINATOR(opts *bind.CallOpts) (common.Address, error) {
- var out []interface{}
- err := _VRFV2PlusLoadTestWithMetrics.contract.Call(opts, &out, "COORDINATOR")
-
- if err != nil {
- return *new(common.Address), err
- }
-
- out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
-
- return out0, err
-
-}
-
-func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsSession) COORDINATOR() (common.Address, error) {
- return _VRFV2PlusLoadTestWithMetrics.Contract.COORDINATOR(&_VRFV2PlusLoadTestWithMetrics.CallOpts)
-}
-
-func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCallerSession) COORDINATOR() (common.Address, error) {
- return _VRFV2PlusLoadTestWithMetrics.Contract.COORDINATOR(&_VRFV2PlusLoadTestWithMetrics.CallOpts)
-}
-
func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCaller) GetRequestStatus(opts *bind.CallOpts, _requestId *big.Int) (GetRequestStatus,
error) {
@@ -414,6 +392,28 @@ func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCallerSession)
return _VRFV2PlusLoadTestWithMetrics.Contract.SSlowestFulfillment(&_VRFV2PlusLoadTestWithMetrics.CallOpts)
}
+func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCaller) SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _VRFV2PlusLoadTestWithMetrics.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 (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusLoadTestWithMetrics.Contract.SVrfCoordinator(&_VRFV2PlusLoadTestWithMetrics.CallOpts)
+}
+
+func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsCallerSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusLoadTestWithMetrics.Contract.SVrfCoordinator(&_VRFV2PlusLoadTestWithMetrics.CallOpts)
+}
+
func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetricsTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
return _VRFV2PlusLoadTestWithMetrics.contract.Transact(opts, "acceptOwnership")
}
@@ -799,8 +799,6 @@ func (_VRFV2PlusLoadTestWithMetrics *VRFV2PlusLoadTestWithMetrics) Address() com
}
type VRFV2PlusLoadTestWithMetricsInterface interface {
- COORDINATOR(opts *bind.CallOpts) (common.Address, error)
-
GetRequestStatus(opts *bind.CallOpts, _requestId *big.Int) (GetRequestStatus,
error)
@@ -823,6 +821,8 @@ type VRFV2PlusLoadTestWithMetricsInterface interface {
SSlowestFulfillment(opts *bind.CallOpts) (*big.Int, error)
+ SVrfCoordinator(opts *bind.CallOpts) (common.Address, error)
+
AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error)
RawFulfillRandomWords(opts *bind.TransactOpts, requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error)
diff --git a/core/gethwrappers/generated/vrf_v2plus_single_consumer/vrf_v2plus_single_consumer.go b/core/gethwrappers/generated/vrf_v2plus_single_consumer/vrf_v2plus_single_consumer.go
index b6c1f6051e..adc4bf2f4f 100644
--- a/core/gethwrappers/generated/vrf_v2plus_single_consumer/vrf_v2plus_single_consumer.go
+++ b/core/gethwrappers/generated/vrf_v2plus_single_consumer/vrf_v2plus_single_consumer.go
@@ -31,8 +31,8 @@ var (
)
var VRFV2PlusSingleConsumerExampleMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"fundAndRequestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestConfig\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"subscribe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"unsubscribe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
- Bin: "0x60806040523480156200001157600080fd5b506040516200182138038062001821833981016040819052620000349162000464565b8633806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620001b4565b5050600280546001600160a01b03199081166001600160a01b03948516179091556003805482168b8516179055600480548216938a169390931790925550600b80543392169190911790556040805160c081018252600080825263ffffffff8881166020840181905261ffff8916948401859052908716606084018190526080840187905285151560a09094018490526005929092556006805465ffffffffffff19169091176401000000009094029390931763ffffffff60301b191666010000000000009091021790915560078390556008805460ff19169091179055620001a762000260565b5050505050505062000530565b6001600160a01b0381163314156200020f5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6200026a620003d4565b604080516001808252818301909252600091602080830190803683370190505090503081600081518110620002a357620002a36200051a565b6001600160a01b039283166020918202929092018101919091526003546040805163288688f960e21b81529051919093169263a21a23e49260048083019391928290030181600087803b158015620002fa57600080fd5b505af11580156200030f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000335919062000500565b600581905560035482516001600160a01b039091169163bec4c08c9184906000906200036557620003656200051a565b60200260200101516040518363ffffffff1660e01b81526004016200039d9291909182526001600160a01b0316602082015260400190565b600060405180830381600087803b158015620003b857600080fd5b505af1158015620003cd573d6000803e3d6000fd5b5050505050565b6000546001600160a01b03163314620004305760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000083565b565b80516001600160a01b03811681146200044a57600080fd5b919050565b805163ffffffff811681146200044a57600080fd5b600080600080600080600060e0888a0312156200048057600080fd5b6200048b8862000432565b96506200049b6020890162000432565b9550620004ab604089016200044f565b9450606088015161ffff81168114620004c357600080fd5b9350620004d3608089016200044f565b925060a0880151915060c08801518015158114620004f057600080fd5b8091505092959891949750929550565b6000602082840312156200051357600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6112e180620005406000396000f3fe608060405234801561001057600080fd5b50600436106100e95760003560e01c80638da5cb5b1161008c578063e0c8628911610066578063e0c862891461021a578063e89e106a14610222578063f2fde38b14610239578063f6eaffc81461024c57600080fd5b80638da5cb5b146101d75780638ea98117146101ff5780638f449a051461021257600080fd5b80637262561c116100c85780637262561c1461012957806379ba50971461013c5780637db9263f1461014457806386850e93146101c457600080fd5b8062f714ce146100ee5780631fe543e3146101035780636fd700bb14610116575b600080fd5b6101016100fc36600461104d565b61025f565b005b610101610111366004611079565b61031a565b61010161012436600461101b565b6103a0565b610101610137366004610fd7565b6105d6565b610101610676565b600554600654600754600854610180939263ffffffff8082169361ffff6401000000008404169366010000000000009093049091169160ff1686565b6040805196875263ffffffff958616602088015261ffff90941693860193909352921660608401526080830191909152151560a082015260c0015b60405180910390f35b6101016101d236600461101b565b610773565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101bb565b61010161020d366004610fd7565b610849565b610101610954565b610101610af9565b61022b600a5481565b6040519081526020016101bb565b610101610247366004610fd7565b610c66565b61022b61025a36600461101b565b610c7a565b610267610c9b565b600480546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116938201939093526024810185905291169063a9059cbb90604401602060405180830381600087803b1580156102dd57600080fd5b505af11580156102f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103159190610ff9565b505050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610392576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b61039c8282610d1e565b5050565b6103a8610c9b565b6040805160c08101825260055480825260065463ffffffff808216602080860191909152640100000000830461ffff16858701526601000000000000909204166060840152600754608084015260085460ff16151560a0840152600454600354855192830193909352929373ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918691016040516020818303038152906040526040518463ffffffff1660e01b8152600401610464939291906111d3565b602060405180830381600087803b15801561047e57600080fd5b505af1158015610492573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b69190610ff9565b5060006040518060c001604052808360800151815260200183600001518152602001836040015161ffff168152602001836020015163ffffffff168152602001836060015163ffffffff16815260200161052360405180602001604052808660a001511515815250610d9c565b90526003546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e9061057c908490600401611211565b602060405180830381600087803b15801561059657600080fd5b505af11580156105aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ce9190611034565b600a55505050565b6105de610c9b565b6003546005546040517f0ae09540000000000000000000000000000000000000000000000000000000008152600481019190915273ffffffffffffffffffffffffffffffffffffffff838116602483015290911690630ae0954090604401600060405180830381600087803b15801561065657600080fd5b505af115801561066a573d6000803e3d6000fd5b50506000600555505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146106f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610389565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61077b610c9b565b6004546003546005546040805160208082019390935281518082039093018352808201918290527f4000aea00000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff93841693634000aea0936107f7939116918691906044016111d3565b602060405180830381600087803b15801561081157600080fd5b505af1158015610825573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039c9190610ff9565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610889575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561090d57336108ae60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610389565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61095c610c9b565b60408051600180825281830190925260009160208083019080368337019050509050308160008151811061099257610992611276565b73ffffffffffffffffffffffffffffffffffffffff928316602091820292909201810191909152600354604080517fa21a23e40000000000000000000000000000000000000000000000000000000081529051919093169263a21a23e49260048083019391928290030181600087803b158015610a0e57600080fd5b505af1158015610a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a469190611034565b6005819055600354825173ffffffffffffffffffffffffffffffffffffffff9091169163bec4c08c918490600090610a8057610a80611276565b60200260200101516040518363ffffffff1660e01b8152600401610ac492919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610ade57600080fd5b505af1158015610af2573d6000803e3d6000fd5b5050505050565b610b01610c9b565b6040805160c08082018352600554825260065463ffffffff808216602080860191825261ffff640100000000850481168789019081526601000000000000909504841660608089019182526007546080808b0191825260085460ff16151560a0808d019182528d519b8c018e5292518b528b518b8801529851909416898c0152945186169088015251909316928501929092528551918201909552905115158152919260009290820190610bb490610d9c565b90526003546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90610c0d908490600401611211565b602060405180830381600087803b158015610c2757600080fd5b505af1158015610c3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5f9190611034565b600a555050565b610c6e610c9b565b610c7781610e58565b50565b60098181548110610c8a57600080fd5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610389565b565b600a548214610d89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f72726563740000000000000000006044820152606401610389565b8051610315906009906020840190610f4e565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401610dd591511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b73ffffffffffffffffffffffffffffffffffffffff8116331415610ed8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610389565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610f89579160200282015b82811115610f89578251825591602001919060010190610f6e565b50610f95929150610f99565b5090565b5b80821115610f955760008155600101610f9a565b803573ffffffffffffffffffffffffffffffffffffffff81168114610fd257600080fd5b919050565b600060208284031215610fe957600080fd5b610ff282610fae565b9392505050565b60006020828403121561100b57600080fd5b81518015158114610ff257600080fd5b60006020828403121561102d57600080fd5b5035919050565b60006020828403121561104657600080fd5b5051919050565b6000806040838503121561106057600080fd5b8235915061107060208401610fae565b90509250929050565b6000806040838503121561108c57600080fd5b8235915060208084013567ffffffffffffffff808211156110ac57600080fd5b818601915086601f8301126110c057600080fd5b8135818111156110d2576110d26112a5565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108582111715611115576111156112a5565b604052828152858101935084860182860187018b101561113457600080fd5b600095505b83861015611157578035855260019590950194938601938601611139565b508096505050505050509250929050565b6000815180845260005b8181101561118e57602081850181015186830182015201611172565b818111156111a0576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681528260208201526060604082015260006112086060830184611168565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c08084015261126e60e0840182611168565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a",
+ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"fundAndRequestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestConfig\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFMigratableCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"subscribe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"unsubscribe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ Bin: "0x60806040523480156200001157600080fd5b506040516200186338038062001863833981016040819052620000349162000464565b8633806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620001b4565b5050600280546001600160a01b03199081166001600160a01b03948516179091556003805482168b8516179055600480548216938a169390931790925550600b80543392169190911790556040805160c081018252600080825263ffffffff8881166020840181905261ffff8916948401859052908716606084018190526080840187905285151560a09094018490526005929092556006805465ffffffffffff19169091176401000000009094029390931763ffffffff60301b191666010000000000009091021790915560078390556008805460ff19169091179055620001a762000260565b5050505050505062000530565b6001600160a01b0381163314156200020f5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6200026a620003d4565b604080516001808252818301909252600091602080830190803683370190505090503081600081518110620002a357620002a36200051a565b6001600160a01b039283166020918202929092018101919091526003546040805163288688f960e21b81529051919093169263a21a23e49260048083019391928290030181600087803b158015620002fa57600080fd5b505af11580156200030f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000335919062000500565b600581905560035482516001600160a01b039091169163bec4c08c9184906000906200036557620003656200051a565b60200260200101516040518363ffffffff1660e01b81526004016200039d9291909182526001600160a01b0316602082015260400190565b600060405180830381600087803b158015620003b857600080fd5b505af1158015620003cd573d6000803e3d6000fd5b5050505050565b6000546001600160a01b03163314620004305760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000083565b565b80516001600160a01b03811681146200044a57600080fd5b919050565b805163ffffffff811681146200044a57600080fd5b600080600080600080600060e0888a0312156200048057600080fd5b6200048b8862000432565b96506200049b6020890162000432565b9550620004ab604089016200044f565b9450606088015161ffff81168114620004c357600080fd5b9350620004d3608089016200044f565b925060a0880151915060c08801518015158114620004f057600080fd5b8091505092959891949750929550565b6000602082840312156200051357600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b61132380620005406000396000f3fe608060405234801561001057600080fd5b50600436106100f45760003560e01c80638da5cb5b11610097578063e0c8628911610066578063e0c862891461025c578063e89e106a14610264578063f2fde38b1461027b578063f6eaffc81461028e57600080fd5b80638da5cb5b146101e25780638ea98117146102215780638f449a05146102345780639eccacf61461023c57600080fd5b80637262561c116100d35780637262561c1461013457806379ba5097146101475780637db9263f1461014f57806386850e93146101cf57600080fd5b8062f714ce146100f95780631fe543e31461010e5780636fd700bb14610121575b600080fd5b61010c61010736600461108f565b6102a1565b005b61010c61011c3660046110bb565b61035c565b61010c61012f36600461105d565b6103e2565b61010c610142366004611019565b610618565b61010c6106b8565b60055460065460075460085461018b939263ffffffff8082169361ffff6401000000008404169366010000000000009093049091169160ff1686565b6040805196875263ffffffff958616602088015261ffff90941693860193909352921660608401526080830191909152151560a082015260c0015b60405180910390f35b61010c6101dd36600461105d565b6107b5565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c6565b61010c61022f366004611019565b61088b565b61010c610996565b6002546101fc9073ffffffffffffffffffffffffffffffffffffffff1681565b61010c610b3b565b61026d600a5481565b6040519081526020016101c6565b61010c610289366004611019565b610ca8565b61026d61029c36600461105d565b610cbc565b6102a9610cdd565b600480546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116938201939093526024810185905291169063a9059cbb90604401602060405180830381600087803b15801561031f57600080fd5b505af1158015610333573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610357919061103b565b505050565b60025473ffffffffffffffffffffffffffffffffffffffff1633146103d4576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6103de8282610d60565b5050565b6103ea610cdd565b6040805160c08101825260055480825260065463ffffffff808216602080860191909152640100000000830461ffff16858701526601000000000000909204166060840152600754608084015260085460ff16151560a0840152600454600354855192830193909352929373ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918691016040516020818303038152906040526040518463ffffffff1660e01b81526004016104a693929190611215565b602060405180830381600087803b1580156104c057600080fd5b505af11580156104d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f8919061103b565b5060006040518060c001604052808360800151815260200183600001518152602001836040015161ffff168152602001836020015163ffffffff168152602001836060015163ffffffff16815260200161056560405180602001604052808660a001511515815250610dde565b90526003546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906105be908490600401611253565b602060405180830381600087803b1580156105d857600080fd5b505af11580156105ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106109190611076565b600a55505050565b610620610cdd565b6003546005546040517f0ae09540000000000000000000000000000000000000000000000000000000008152600481019190915273ffffffffffffffffffffffffffffffffffffffff838116602483015290911690630ae0954090604401600060405180830381600087803b15801561069857600080fd5b505af11580156106ac573d6000803e3d6000fd5b50506000600555505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610739576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016103cb565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6107bd610cdd565b6004546003546005546040805160208082019390935281518082039093018352808201918290527f4000aea00000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09361083993911691869190604401611215565b602060405180830381600087803b15801561085357600080fd5b505af1158015610867573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103de919061103b565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906108cb575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561094f57336108f060005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff938416600482015291831660248301529190911660448201526064016103cb565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61099e610cdd565b6040805160018082528183019092526000916020808301908036833701905050905030816000815181106109d4576109d46112b8565b73ffffffffffffffffffffffffffffffffffffffff928316602091820292909201810191909152600354604080517fa21a23e40000000000000000000000000000000000000000000000000000000081529051919093169263a21a23e49260048083019391928290030181600087803b158015610a5057600080fd5b505af1158015610a64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a889190611076565b6005819055600354825173ffffffffffffffffffffffffffffffffffffffff9091169163bec4c08c918490600090610ac257610ac26112b8565b60200260200101516040518363ffffffff1660e01b8152600401610b0692919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610b2057600080fd5b505af1158015610b34573d6000803e3d6000fd5b5050505050565b610b43610cdd565b6040805160c08082018352600554825260065463ffffffff808216602080860191825261ffff640100000000850481168789019081526601000000000000909504841660608089019182526007546080808b0191825260085460ff16151560a0808d019182528d519b8c018e5292518b528b518b8801529851909416898c0152945186169088015251909316928501929092528551918201909552905115158152919260009290820190610bf690610dde565b90526003546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90610c4f908490600401611253565b602060405180830381600087803b158015610c6957600080fd5b505af1158015610c7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca19190611076565b600a555050565b610cb0610cdd565b610cb981610e9a565b50565b60098181548110610ccc57600080fd5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016103cb565b565b600a548214610dcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f727265637400000000000000000060448201526064016103cb565b8051610357906009906020840190610f90565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401610e1791511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b73ffffffffffffffffffffffffffffffffffffffff8116331415610f1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016103cb565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610fcb579160200282015b82811115610fcb578251825591602001919060010190610fb0565b50610fd7929150610fdb565b5090565b5b80821115610fd75760008155600101610fdc565b803573ffffffffffffffffffffffffffffffffffffffff8116811461101457600080fd5b919050565b60006020828403121561102b57600080fd5b61103482610ff0565b9392505050565b60006020828403121561104d57600080fd5b8151801515811461103457600080fd5b60006020828403121561106f57600080fd5b5035919050565b60006020828403121561108857600080fd5b5051919050565b600080604083850312156110a257600080fd5b823591506110b260208401610ff0565b90509250929050565b600080604083850312156110ce57600080fd5b8235915060208084013567ffffffffffffffff808211156110ee57600080fd5b818601915086601f83011261110257600080fd5b813581811115611114576111146112e7565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108582111715611157576111576112e7565b604052828152858101935084860182860187018b101561117657600080fd5b600095505b8386101561119957803585526001959095019493860193860161117b565b508096505050505050509250929050565b6000815180845260005b818110156111d0576020818501810151868301820152016111b4565b818111156111e2576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff8416815282602082015260606040820152600061124a60608301846111aa565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c0808401526112b060e08401826111aa565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a",
}
var VRFV2PlusSingleConsumerExampleABI = VRFV2PlusSingleConsumerExampleMetaData.ABI
@@ -271,6 +271,28 @@ func (_VRFV2PlusSingleConsumerExample *VRFV2PlusSingleConsumerExampleCallerSessi
return _VRFV2PlusSingleConsumerExample.Contract.SRequestId(&_VRFV2PlusSingleConsumerExample.CallOpts)
}
+func (_VRFV2PlusSingleConsumerExample *VRFV2PlusSingleConsumerExampleCaller) SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _VRFV2PlusSingleConsumerExample.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 (_VRFV2PlusSingleConsumerExample *VRFV2PlusSingleConsumerExampleSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusSingleConsumerExample.Contract.SVrfCoordinator(&_VRFV2PlusSingleConsumerExample.CallOpts)
+}
+
+func (_VRFV2PlusSingleConsumerExample *VRFV2PlusSingleConsumerExampleCallerSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusSingleConsumerExample.Contract.SVrfCoordinator(&_VRFV2PlusSingleConsumerExample.CallOpts)
+}
+
func (_VRFV2PlusSingleConsumerExample *VRFV2PlusSingleConsumerExampleTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
return _VRFV2PlusSingleConsumerExample.contract.Transact(opts, "acceptOwnership")
}
@@ -707,6 +729,8 @@ type VRFV2PlusSingleConsumerExampleInterface interface {
SRequestId(opts *bind.CallOpts) (*big.Int, error)
+ SVrfCoordinator(opts *bind.CallOpts) (common.Address, error)
+
AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error)
FundAndRequestRandomWords(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error)
diff --git a/core/gethwrappers/generated/vrf_v2plus_sub_owner/vrf_v2plus_sub_owner.go b/core/gethwrappers/generated/vrf_v2plus_sub_owner/vrf_v2plus_sub_owner.go
index a3b8aed8cd..f422ed29bc 100644
--- a/core/gethwrappers/generated/vrf_v2plus_sub_owner/vrf_v2plus_sub_owner.go
+++ b/core/gethwrappers/generated/vrf_v2plus_sub_owner/vrf_v2plus_sub_owner.go
@@ -31,8 +31,8 @@ var (
)
var VRFV2PlusExternalSubOwnerExampleMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
- Bin: "0x608060405234801561001057600080fd5b50604051610d25380380610d2583398101604081905261002f916101d0565b8133806000816100865760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156100b6576100b68161010a565b5050600280546001600160a01b039384166001600160a01b03199182161790915560038054958416958216959095179094555060048054929091169183169190911790556007805490911633179055610203565b6001600160a01b0381163314156101635760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161007d565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146101cb57600080fd5b919050565b600080604083850312156101e357600080fd5b6101ec836101b4565b91506101fa602084016101b4565b90509250929050565b610b13806102126000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638ea981171161005b5780638ea98117146100ea578063e89e106a146100fd578063f2fde38b14610114578063f6eaffc81461012757600080fd5b80631fe543e31461008d5780635b6c5de8146100a257806379ba5097146100b55780638da5cb5b146100bd575b600080fd5b6100a061009b3660046108b0565b61013a565b005b6100a06100b036600461099f565b6101c0565b6100a06102d3565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100a06100f8366004610841565b6103d0565b61010660065481565b6040519081526020016100e1565b6100a0610122366004610841565b6104db565b61010661013536600461087e565b6104ef565b60025473ffffffffffffffffffffffffffffffffffffffff1633146101b2576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6101bc8282610510565b5050565b6101c8610593565b60006040518060c001604052808481526020018881526020018661ffff1681526020018763ffffffff1681526020018563ffffffff16815260200161021c6040518060200160405280861515815250610616565b90526003546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90610275908490600401610a17565b602060405180830381600087803b15801561028f57600080fd5b505af11580156102a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c79190610897565b60065550505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610354576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016101a9565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610410575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610494573361043560005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff938416600482015291831660248301529190911660448201526064016101a9565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6104e3610593565b6104ec816106d2565b50565b600581815481106104ff57600080fd5b600091825260209091200154905081565b600654821461057b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f727265637400000000000000000060448201526064016101a9565b805161058e9060059060208401906107c8565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610614576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016101a9565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161064f91511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b73ffffffffffffffffffffffffffffffffffffffff8116331415610752576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016101a9565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610803579160200282015b828111156108035782518255916020019190600101906107e8565b5061080f929150610813565b5090565b5b8082111561080f5760008155600101610814565b803563ffffffff8116811461083c57600080fd5b919050565b60006020828403121561085357600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461087757600080fd5b9392505050565b60006020828403121561089057600080fd5b5035919050565b6000602082840312156108a957600080fd5b5051919050565b600080604083850312156108c357600080fd5b8235915060208084013567ffffffffffffffff808211156108e357600080fd5b818601915086601f8301126108f757600080fd5b81358181111561090957610909610ad7565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561094c5761094c610ad7565b604052828152858101935084860182860187018b101561096b57600080fd5b600095505b8386101561098e578035855260019590950194938601938601610970565b508096505050505050509250929050565b60008060008060008060c087890312156109b857600080fd5b863595506109c860208801610828565b9450604087013561ffff811681146109df57600080fd5b93506109ed60608801610828565b92506080870135915060a08701358015158114610a0957600080fd5b809150509295509295509295565b6000602080835283518184015280840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b81811015610a8e5782810184015186820161010001528301610a71565b81811115610aa157600061010083880101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169390930161010001949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a",
+ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFMigratableCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ Bin: "0x608060405234801561001057600080fd5b50604051610d77380380610d7783398101604081905261002f916101d0565b8133806000816100865760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156100b6576100b68161010a565b5050600280546001600160a01b039384166001600160a01b03199182161790915560038054958416958216959095179094555060048054929091169183169190911790556007805490911633179055610203565b6001600160a01b0381163314156101635760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161007d565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146101cb57600080fd5b919050565b600080604083850312156101e357600080fd5b6101ec836101b4565b91506101fa602084016101b4565b90509250929050565b610b65806102126000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80638ea9811711610076578063e89e106a1161005b578063e89e106a1461014f578063f2fde38b14610166578063f6eaffc81461017957600080fd5b80638ea981171461011c5780639eccacf61461012f57600080fd5b80631fe543e3146100a85780635b6c5de8146100bd57806379ba5097146100d05780638da5cb5b146100d8575b600080fd5b6100bb6100b6366004610902565b61018c565b005b6100bb6100cb3660046109f1565b610212565b6100bb610325565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100bb61012a366004610893565b610422565b6002546100f29073ffffffffffffffffffffffffffffffffffffffff1681565b61015860065481565b604051908152602001610113565b6100bb610174366004610893565b61052d565b6101586101873660046108d0565b610541565b60025473ffffffffffffffffffffffffffffffffffffffff163314610204576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b61020e8282610562565b5050565b61021a6105e5565b60006040518060c001604052808481526020018881526020018661ffff1681526020018763ffffffff1681526020018563ffffffff16815260200161026e6040518060200160405280861515815250610668565b90526003546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906102c7908490600401610a69565b602060405180830381600087803b1580156102e157600080fd5b505af11580156102f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031991906108e9565b60065550505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146103a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016101fb565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610462575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156104e6573361048760005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff938416600482015291831660248301529190911660448201526064016101fb565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6105356105e5565b61053e81610724565b50565b6005818154811061055157600080fd5b600091825260209091200154905081565b60065482146105cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f727265637400000000000000000060448201526064016101fb565b80516105e090600590602084019061081a565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016101fb565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016106a191511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b73ffffffffffffffffffffffffffffffffffffffff81163314156107a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016101fb565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610855579160200282015b8281111561085557825182559160200191906001019061083a565b50610861929150610865565b5090565b5b808211156108615760008155600101610866565b803563ffffffff8116811461088e57600080fd5b919050565b6000602082840312156108a557600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146108c957600080fd5b9392505050565b6000602082840312156108e257600080fd5b5035919050565b6000602082840312156108fb57600080fd5b5051919050565b6000806040838503121561091557600080fd5b8235915060208084013567ffffffffffffffff8082111561093557600080fd5b818601915086601f83011261094957600080fd5b81358181111561095b5761095b610b29565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561099e5761099e610b29565b604052828152858101935084860182860187018b10156109bd57600080fd5b600095505b838610156109e05780358552600195909501949386019386016109c2565b508096505050505050509250929050565b60008060008060008060c08789031215610a0a57600080fd5b86359550610a1a6020880161087a565b9450604087013561ffff81168114610a3157600080fd5b9350610a3f6060880161087a565b92506080870135915060a08701358015158114610a5b57600080fd5b809150509295509295509295565b6000602080835283518184015280840151604084015261ffff6040850151166060840152606084015163ffffffff80821660808601528060808701511660a0860152505060a084015160c08085015280518060e086015260005b81811015610ae05782810184015186820161010001528301610ac3565b81811115610af357600061010083880101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169390930161010001949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a",
}
var VRFV2PlusExternalSubOwnerExampleABI = VRFV2PlusExternalSubOwnerExampleMetaData.ABI
@@ -237,6 +237,28 @@ func (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExampleCallerS
return _VRFV2PlusExternalSubOwnerExample.Contract.SRequestId(&_VRFV2PlusExternalSubOwnerExample.CallOpts)
}
+func (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExampleCaller) SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _VRFV2PlusExternalSubOwnerExample.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 (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExampleSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusExternalSubOwnerExample.Contract.SVrfCoordinator(&_VRFV2PlusExternalSubOwnerExample.CallOpts)
+}
+
+func (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExampleCallerSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusExternalSubOwnerExample.Contract.SVrfCoordinator(&_VRFV2PlusExternalSubOwnerExample.CallOpts)
+}
+
func (_VRFV2PlusExternalSubOwnerExample *VRFV2PlusExternalSubOwnerExampleTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
return _VRFV2PlusExternalSubOwnerExample.contract.Transact(opts, "acceptOwnership")
}
@@ -600,6 +622,8 @@ type VRFV2PlusExternalSubOwnerExampleInterface interface {
SRequestId(opts *bind.CallOpts) (*big.Int, error)
+ SVrfCoordinator(opts *bind.CallOpts) (common.Address, error)
+
AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error)
RawFulfillRandomWords(opts *bind.TransactOpts, requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error)
diff --git a/core/gethwrappers/generated/vrf_v2plus_upgraded_version/vrf_v2plus_upgraded_version.go b/core/gethwrappers/generated/vrf_v2plus_upgraded_version/vrf_v2plus_upgraded_version.go
new file mode 100644
index 0000000000..fdb64cecc4
--- /dev/null
+++ b/core/gethwrappers/generated/vrf_v2plus_upgraded_version/vrf_v2plus_upgraded_version.go
@@ -0,0 +1,3667 @@
+// Code generated - DO NOT EDIT.
+// This file is a generated binding and any manual changes will be lost.
+
+package vrf_v2plus_upgraded_version
+
+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 VRFCoordinatorV2PlusUpgradedVersionFeeConfig struct {
+ FulfillmentFlatFeeLinkPPM uint32
+ FulfillmentFlatFeeEthPPM uint32
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionRequestCommitment struct {
+ BlockNum uint64
+ SubId *big.Int
+ CallbackGasLimit uint32
+ NumWords uint32
+ Sender common.Address
+ ExtraArgs []byte
+}
+
+type VRFProof struct {
+ Pk [2]*big.Int
+ Gamma [2]*big.Int
+ C *big.Int
+ S *big.Int
+ Seed *big.Int
+ UWitness common.Address
+ CGammaWitness [2]*big.Int
+ SHashWitness [2]*big.Int
+ ZInv *big.Int
+}
+
+type VRFV2PlusClientRandomWordsRequest struct {
+ KeyHash [32]byte
+ SubId *big.Int
+ RequestConfirmations uint16
+ CallbackGasLimit uint32
+ NumWords uint32
+ ExtraArgs []byte
+}
+
+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\":\"FailedToSendEther\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"GasLimitTooBig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectCommitment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"have\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"want\",\"type\":\"uint256\"}],\"name\":\"InsufficientGasForConsumer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"InvalidConsumer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExtraArgsTag\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"linkWei\",\"type\":\"int256\"}],\"name\":\"InvalidLinkWeiPrice\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"transferredValue\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"expectedValue\",\"type\":\"uint96\"}],\"name\":\"InvalidNativeBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"have\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"min\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"max\",\"type\":\"uint16\"}],\"name\":\"InvalidRequestConfirmations\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"requestVersion\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"expectedVersion\",\"type\":\"uint8\"}],\"name\":\"InvalidVersion\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkNotSet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedOwner\",\"type\":\"address\"}],\"name\":\"MustBeRequestedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"MustBeSubOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoCorrespondingRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"NoSuchProvingKey\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"NumWordsTooBig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableFromLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingRequestExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"}],\"name\":\"ProvingKeyAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Reentrant\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SubscriptionIDCollisionFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyConsumers\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeEthPPM\",\"type\":\"uint32\"}],\"indexed\":false,\"internalType\":\"structVRFCoordinatorV2PlusUpgradedVersion.FeeConfig\",\"name\":\"feeConfig\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"coordinatorAddress\",\"type\":\"address\"}],\"name\":\"CoordinatorRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EthFundsRecovered\",\"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\":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\":\"ProvingKeyRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputSeed\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"RandomWordsFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"preSeed\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RandomWordsRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountLink\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountEth\",\"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\":\"oldEthBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newEthBalance\",\"type\":\"uint256\"}],\"name\":\"SubscriptionFundedWithEth\",\"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_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\":\"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\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256[2]\",\"name\":\"pk\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"gamma\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"c\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"uWitness\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"cGammaWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"sHashWitness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"zInv\",\"type\":\"uint256\"}],\"internalType\":\"structVRF.Proof\",\"name\":\"proof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockNum\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFCoordinatorV2PlusUpgradedVersion.RequestCommitment\",\"name\":\"rc\",\"type\":\"tuple\"}],\"name\":\"fulfillRandomWords\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"fundSubscriptionWithEth\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveSubscriptionIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"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\":\"ethBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"reqCount\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"publicKey\",\"type\":\"uint256[2]\"}],\"name\":\"hashOfKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"migrationVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedData\",\"type\":\"bytes\"}],\"name\":\"onMigration\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdrawEth\",\"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\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverEthFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"registerMigratableCoordinator\",\"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\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"removeConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"internalType\":\"structVRFV2PlusClient.RandomWordsRequest\",\"name\":\"req\",\"type\":\"tuple\"}],\"name\":\"requestRandomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"requestSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_config\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"reentrancyLock\",\"type\":\"bool\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"}],\"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_feeConfig\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeEthPPM\",\"type\":\"uint32\"}],\"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\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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_totalEthBalance\",\"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\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeEthPPM\",\"type\":\"uint32\"}],\"internalType\":\"structVRFCoordinatorV2PlusUpgradedVersion.FeeConfig\",\"name\":\"feeConfig\",\"type\":\"tuple\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkEthFeed\",\"type\":\"address\"}],\"name\":\"setLINKAndLINKETHFeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ Bin: "0x60a06040523480156200001157600080fd5b50604051620060b9380380620060b9833981016040819052620000349162000183565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d7565b50505060601b6001600160601b031916608052620001b5565b6001600160a01b038116331415620001325760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019657600080fd5b81516001600160a01b0381168114620001ae57600080fd5b9392505050565b60805160601c615ede620001db600039600081816104c401526136f60152615ede6000f3fe6080604052600436106102015760003560e01c806201229114610206578063043bd6ae14610233578063088070f5146102575780630ae09540146102d757806315c48b84146102f95780631b6b6d2314610321578063294daa491461034e578063330987b31461036a578063405b84fa146103a257806340d6bb82146103c257806341af6c87146103ed57806346d8d4861461041d57806357133e641461043d5780635d06b4ab1461045d57806364d51a2a1461047d57806366316d8d14610492578063689c4517146104b25780636b6feccc146104e65780636f64f03f1461051c57806379ba50971461053c57806386fe91c7146105515780638da5cb5b146105715780639b1c385e1461058f5780639d40a6fd146105af578063a21a23e4146105dc578063a4c0ed36146105f1578063a8cb447b14610611578063aa433aff14610631578063ad17836114610651578063aefb212f14610671578063b08c87951461069e578063b2a7cac5146106be578063bec4c08c146106de578063caf70c4a146106fe578063cb6317971461071e578063ce3f47191461073e578063d98e620e14610751578063da2f261014610771578063dac83d29146107a7578063dc311dd3146107c7578063e72f6e30146107f8578063e8509bff14610818578063e95704bd1461082b578063ee9d2d3814610852578063f2fde38b1461087f575b600080fd5b34801561021257600080fd5b5061021b61089f565b60405161022a939291906159d4565b60405180910390f35b34801561023f57600080fd5b5061024960115481565b60405190815260200161022a565b34801561026357600080fd5b50600d5461029f9061ffff81169063ffffffff62010000820481169160ff600160301b82041691600160381b8204811691600160581b90041685565b6040805161ffff909616865263ffffffff9485166020870152921515928501929092528216606084015216608082015260a00161022a565b3480156102e357600080fd5b506102f76102f2366004615655565b61091b565b005b34801561030557600080fd5b5061030e60c881565b60405161ffff909116815260200161022a565b34801561032d57600080fd5b50600254610341906001600160a01b031681565b60405161022a9190615878565b34801561035a57600080fd5b506040516001815260200161022a565b34801561037657600080fd5b5061038a6103853660046153c3565b6109e9565b6040516001600160601b03909116815260200161022a565b3480156103ae57600080fd5b506102f76103bd366004615655565b610ec4565b3480156103ce57600080fd5b506103d86101f481565b60405163ffffffff909116815260200161022a565b3480156103f957600080fd5b5061040d610408366004615305565b6112af565b604051901515815260200161022a565b34801561042957600080fd5b506102f76104383660046151c7565b611450565b34801561044957600080fd5b506102f76104583660046151fc565b6115cd565b34801561046957600080fd5b506102f76104783660046151aa565b61162d565b34801561048957600080fd5b5061030e606481565b34801561049e57600080fd5b506102f76104ad3660046151c7565b6116e4565b3480156104be57600080fd5b506103417f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f257600080fd5b5060125461050e9063ffffffff80821691600160201b90041682565b60405161022a929190615b56565b34801561052857600080fd5b506102f7610537366004615235565b6118ac565b34801561054857600080fd5b506102f76119b3565b34801561055d57600080fd5b50600a5461038a906001600160601b031681565b34801561057d57600080fd5b506000546001600160a01b0316610341565b34801561059b57600080fd5b506102496105aa3660046154a0565b611a5d565b3480156105bb57600080fd5b506007546105cf906001600160401b031681565b60405161022a9190615b6d565b3480156105e857600080fd5b50610249611dcd565b3480156105fd57600080fd5b506102f761060c366004615271565b61201b565b34801561061d57600080fd5b506102f761062c3660046151aa565b6121b8565b34801561063d57600080fd5b506102f761064c366004615305565b6122c4565b34801561065d57600080fd5b50600354610341906001600160a01b031681565b34801561067d57600080fd5b5061069161068c36600461567a565b612327565b60405161022a91906158ef565b3480156106aa57600080fd5b506102f76106b93660046155b7565b612428565b3480156106ca57600080fd5b506102f76106d9366004615305565b61259c565b3480156106ea57600080fd5b506102f76106f9366004615655565b6126cc565b34801561070a57600080fd5b506102496107193660046152cc565b612863565b34801561072a57600080fd5b506102f7610739366004615655565b612893565b6102f761074c366004615337565b612b80565b34801561075d57600080fd5b5061024961076c366004615305565b612e91565b34801561077d57600080fd5b5061034161078c366004615305565b600e602052600090815260409020546001600160a01b031681565b3480156107b357600080fd5b506102f76107c2366004615655565b612eb2565b3480156107d357600080fd5b506107e76107e2366004615305565b612fc2565b60405161022a959493929190615b81565b34801561080457600080fd5b506102f76108133660046151aa565b6130bd565b6102f7610826366004615305565b613298565b34801561083757600080fd5b50600a5461038a90600160601b90046001600160601b031681565b34801561085e57600080fd5b5061024961086d366004615305565b60106020526000908152604090205481565b34801561088b57600080fd5b506102f761089a3660046151aa565b6133d0565b600d54600f805460408051602080840282018101909252828152600094859460609461ffff8316946201000090930463ffffffff1693919283919083018282801561090957602002820191906000526020600020905b8154815260200190600101908083116108f5575b50505050509050925092509250909192565b60008281526005602052604090205482906001600160a01b03168061095357604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b038216146109875780604051636c51fda960e11b815260040161097e9190615878565b60405180910390fd5b600d54600160301b900460ff16156109b25760405163769dd35360e11b815260040160405180910390fd5b6109bb846112af565b156109d957604051631685ecdd60e31b815260040160405180910390fd5b6109e384846133e1565b50505050565b600d54600090600160301b900460ff1615610a175760405163769dd35360e11b815260040160405180910390fd5b60005a90506000610a28858561359c565b90506000846060015163ffffffff166001600160401b03811115610a4e57610a4e615e98565b604051908082528060200260200182016040528015610a77578160200160208202803683370190505b50905060005b856060015163ffffffff16811015610aee57826040015181604051602001610aa6929190615902565b6040516020818303038152906040528051906020012060001c828281518110610ad157610ad1615e82565b602090810291909101015280610ae681615dea565b915050610a7d565b5060208083018051600090815260109092526040808320839055905190518291631fe543e360e01b91610b2691908690602401615a5e565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600d805460ff60301b1916600160301b179055908801516080890151919250600091610b8b9163ffffffff16908461380f565b600d805460ff60301b19169055602089810151600090815260069091526040902054909150600160c01b90046001600160401b0316610bcb816001615cfb565b6020808b0151600090815260069091526040812080546001600160401b0393909316600160c01b026001600160c01b039093169290921790915560a08a01518051610c1890600190615d7b565b81518110610c2857610c28615e82565b602091010151600d5460f89190911c6001149150600090610c59908a90600160581b900463ffffffff163a8561385d565b90508115610d62576020808c01516000908152600690915260409020546001600160601b03808316600160601b909204161015610ca957604051631e9acf1760e31b815260040160405180910390fd5b60208b81015160009081526006909152604090208054829190600c90610ce0908490600160601b90046001600160601b0316615d92565b82546101009290920a6001600160601b0381810219909316918316021790915589516000908152600e60209081526040808320546001600160a01b03168352600c909152812080548594509092610d3991859116615d26565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550610e4e565b6020808c01516000908152600690915260409020546001600160601b0380831691161015610da357604051631e9acf1760e31b815260040160405180910390fd5b6020808c015160009081526006909152604081208054839290610dd09084906001600160601b0316615d92565b82546101009290920a6001600160601b0381810219909316918316021790915589516000908152600e60209081526040808320546001600160a01b03168352600b909152812080548594509092610e2991859116615d26565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b8a6020015188602001517f49580fdfd9497e1ed5c1b1cec0495087ae8e3f1267470ec2fb015db32e3d6aa78a604001518488604051610eab939291909283526001600160601b039190911660208301521515604082015260600190565b60405180910390a3985050505050505050505b92915050565b600d54600160301b900460ff1615610eef5760405163769dd35360e11b815260040160405180910390fd5b610ef8816138ac565b610f175780604051635428d44960e01b815260040161097e9190615878565b600080600080610f2686612fc2565b945094505093509350336001600160a01b0316826001600160a01b031614610f895760405162461bcd60e51b81526020600482015260166024820152752737ba1039bab139b1b934b83a34b7b71037bbb732b960511b604482015260640161097e565b610f92866112af565b15610fd85760405162461bcd60e51b815260206004820152601660248201527550656e64696e6720726571756573742065786973747360501b604482015260640161097e565b60006040518060c00160405280610fed600190565b60ff168152602001888152602001846001600160a01b03168152602001838152602001866001600160601b03168152602001856001600160601b031681525090506000816040516020016110419190615941565b604051602081830303815290604052905061105b88613916565b505060405163ce3f471960e01b81526001600160a01b0388169063ce3f4719906001600160601b0388169061109490859060040161592e565b6000604051808303818588803b1580156110ad57600080fd5b505af11580156110c1573d6000803e3d6000fd5b50506002546001600160a01b0316158015935091506110ea905057506001600160601b03861615155b156111b45760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90611121908a908a906004016158bf565b602060405180830381600087803b15801561113b57600080fd5b505af115801561114f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117391906152e8565b6111b45760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b604482015260640161097e565b600d805460ff60301b1916600160301b17905560005b835181101561125d578381815181106111e5576111e5615e82565b60200260200101516001600160a01b0316638ea98117896040518263ffffffff1660e01b81526004016112189190615878565b600060405180830381600087803b15801561123257600080fd5b505af1158015611246573d6000803e3d6000fd5b50505050808061125590615dea565b9150506111ca565b50600d805460ff60301b191690556040517fd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be41879061129d9089908b9061588c565b60405180910390a15050505050505050565b6000818152600560209081526040808320815160608101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152879693958601939092919083018282801561133957602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161131b575b505050505081525050905060005b8160400151518110156114465760005b600f548110156114335760006113fc600f838154811061137957611379615e82565b90600052602060002001548560400151858151811061139a5761139a615e82565b60200260200101518860046000896040015189815181106113bd576113bd615e82565b6020908102919091018101516001600160a01b0316825281810192909252604090810160009081208d82529092529020546001600160401b0316613b64565b50600081815260106020526040902054909150156114205750600195945050505050565b508061142b81615dea565b915050611357565b508061143e81615dea565b915050611347565b5060009392505050565b600d54600160301b900460ff161561147b5760405163769dd35360e11b815260040160405180910390fd5b336000908152600c60205260409020546001600160601b03808316911610156114b757604051631e9acf1760e31b815260040160405180910390fd5b336000908152600c6020526040812080548392906114df9084906001600160601b0316615d92565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a600c8282829054906101000a90046001600160601b03166115279190615d92565b92506101000a8154816001600160601b0302191690836001600160601b031602179055506000826001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d80600081146115a1576040519150601f19603f3d011682016040523d82523d6000602084013e6115a6565b606091505b50509050806115c857604051630dcf35db60e41b815260040160405180910390fd5b505050565b6115d5613bed565b6002546001600160a01b0316156115ff57604051631688c53760e11b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b611635613bed565b61163e816138ac565b1561165e578060405163ac8a27ef60e01b815260040161097e9190615878565b601380546001810182556000919091527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0900180546001600160a01b0319166001600160a01b0383161790556040517fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af01625906116d9908390615878565b60405180910390a150565b600d54600160301b900460ff161561170f5760405163769dd35360e11b815260040160405180910390fd5b6002546001600160a01b03166117385760405163c1f0c0a160e01b815260040160405180910390fd5b336000908152600b60205260409020546001600160601b038083169116101561177457604051631e9acf1760e31b815260040160405180910390fd5b336000908152600b60205260408120805483929061179c9084906001600160601b0316615d92565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a60008282829054906101000a90046001600160601b03166117e49190615d92565b82546001600160601b039182166101009390930a92830291909202199091161790555060025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061183990859085906004016158bf565b602060405180830381600087803b15801561185357600080fd5b505af1158015611867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061188b91906152e8565b6118a857604051631e9acf1760e31b815260040160405180910390fd5b5050565b6118b4613bed565b6040805180820182526000916118e3919084906002908390839080828437600092019190915250612863915050565b6000818152600e60205260409020549091506001600160a01b03161561191f57604051634a0b8fa760e01b81526004810182905260240161097e565b6000818152600e6020908152604080832080546001600160a01b0319166001600160a01b038816908117909155600f805460018101825594527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802909301849055518381527fe729ae16526293f74ade739043022254f1489f616295a25bf72dfb4511ed73b8910160405180910390a2505050565b6001546001600160a01b03163314611a065760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b604482015260640161097e565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b600d54600090600160301b900460ff1615611a8b5760405163769dd35360e11b815260040160405180910390fd5b6020808301356000908152600590915260409020546001600160a01b0316611ac657604051630fb532db60e11b815260040160405180910390fd5b3360009081526004602090815260408083208583013584529091529020546001600160401b031680611b13578260200135336040516379bfd40160e01b815260040161097e929190615a33565b600d5461ffff16611b2a606085016040860161559c565b61ffff161080611b4d575060c8611b47606085016040860161559c565b61ffff16115b15611b8757611b62606084016040850161559c565b600d5460405163539c34bb60e11b815261097e929161ffff169060c8906004016159b6565b600d5462010000900463ffffffff16611ba6608085016060860161569c565b63ffffffff161115611bec57611bc2608084016060850161569c565b600d54604051637aebf00f60e11b815261097e929162010000900463ffffffff1690600401615b56565b6101f4611bff60a085016080860161569c565b63ffffffff161115611c3957611c1b60a084016080850161569c565b6101f46040516311ce1afb60e21b815260040161097e929190615b56565b6000611c46826001615cfb565b9050600080611c5c863533602089013586613b64565b90925090506000611c78611c7360a0890189615bd6565b613c42565b90506000611c8582613cbf565b905083611c90613d30565b60208a0135611ca560808c0160608d0161569c565b611cb560a08d0160808e0161569c565b3386604051602001611ccd9796959493929190615ab6565b604051602081830303815290604052805190602001206010600086815260200190815260200160002081905550336001600160a01b0316886020013589600001357feb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e87878d6040016020810190611d44919061559c565b8e6060016020810190611d57919061569c565b8f6080016020810190611d6a919061569c565b89604051611d7d96959493929190615a77565b60405180910390a45050336000908152600460209081526040808320898301358452909152902080546001600160401b0319166001600160401b039490941693909317909255925050505b919050565b600d54600090600160301b900460ff1615611dfb5760405163769dd35360e11b815260040160405180910390fd5b600033611e09600143615d7b565b600754604051606093841b6001600160601b03199081166020830152924060348201523090931b909116605483015260c01b6001600160c01b031916606882015260700160408051601f198184030181529190528051602090910120600780549192506001600160401b03909116906000611e8383615e05565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550506000806001600160401b03811115611ec257611ec2615e98565b604051908082528060200260200182016040528015611eeb578160200160208202803683370190505b506040805160608082018352600080835260208084018281528486018381528984526006835286842095518654925191516001600160601b039182166001600160c01b031990941693909317600160601b9190921602176001600160c01b0316600160c01b6001600160401b039092169190910217909355835191820184523382528183018181528285018681528883526005855294909120825181546001600160a01b03199081166001600160a01b039283161783559251600183018054909416911617909155925180519495509093611fcc9260028501920190614e1b565b50611fdc91506008905083613dc9565b50817f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d3360405161200d9190615878565b60405180910390a250905090565b600d54600160301b900460ff16156120465760405163769dd35360e11b815260040160405180910390fd5b6002546001600160a01b03163314612071576040516344b0e3c360e01b815260040160405180910390fd5b6020811461209257604051638129bbcd60e01b815260040160405180910390fd5b60006120a082840184615305565b6000818152600560205260409020549091506001600160a01b03166120d857604051630fb532db60e11b815260040160405180910390fd5b600081815260066020526040812080546001600160601b0316918691906120ff8385615d26565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600a60008282829054906101000a90046001600160601b03166121479190615d26565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a82878461219a9190615ce3565b6040516121a8929190615902565b60405180910390a2505050505050565b6121c0613bed565b600a544790600160601b90046001600160601b0316818111156121fa5780826040516354ced18160e11b815260040161097e929190615902565b818110156115c857600061220e8284615d7b565b90506000846001600160a01b03168260405160006040518083038185875af1925050503d806000811461225d576040519150601f19603f3d011682016040523d82523d6000602084013e612262565b606091505b505090508061228457604051630dcf35db60e41b815260040160405180910390fd5b7f879c9ea2b9d5345b84ccd12610b032602808517cebdb795007f3dcb4df37731785836040516122b592919061588c565b60405180910390a15050505050565b6122cc613bed565b6000818152600560205260409020546001600160a01b031661230157604051630fb532db60e11b815260040160405180910390fd5b6000818152600560205260409020546123249082906001600160a01b03166133e1565b50565b606060006123356008613dd5565b905080841061235757604051631390f2a160e01b815260040160405180910390fd5b60006123638486615ce3565b905081811180612371575083155b61237b578061237d565b815b9050600061238b8683615d7b565b6001600160401b038111156123a2576123a2615e98565b6040519080825280602002602001820160405280156123cb578160200160208202803683370190505b50905060005b815181101561241e576123ef6123e78883615ce3565b600890613ddf565b82828151811061240157612401615e82565b60209081029190910101528061241681615dea565b9150506123d1565b5095945050505050565b612430613bed565b60c861ffff8716111561245d57858660c860405163539c34bb60e11b815260040161097e939291906159b6565b60008213612481576040516321ea67b360e11b81526004810183905260240161097e565b6040805160a0808201835261ffff891680835263ffffffff89811660208086018290526000868801528a831660608088018290528b85166080988901819052600d805465ffffffffffff1916881762010000870217600160301b600160781b031916600160381b850263ffffffff60581b191617600160581b83021790558a51601280548d8701519289166001600160401b031990911617600160201b92891692909202919091179081905560118d90558a519788528785019590955298860191909152840196909652938201879052838116928201929092529190921c90911660c08201527f777357bb93f63d088f18112d3dba38457aec633eb8f1341e1d418380ad328e789060e00160405180910390a1505050505050565b600d54600160301b900460ff16156125c75760405163769dd35360e11b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b03166125fc57604051630fb532db60e11b815260040160405180910390fd5b6000818152600560205260409020600101546001600160a01b03163314612653576000818152600560205260409081902060010154905163d084e97560e01b815261097e916001600160a01b031690600401615878565b6000818152600560205260409081902080546001600160a01b031980821633908117845560019093018054909116905591516001600160a01b039092169183917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c9386916126c09185916158a5565b60405180910390a25050565b60008281526005602052604090205482906001600160a01b03168061270457604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b0382161461272f5780604051636c51fda960e11b815260040161097e9190615878565b600d54600160301b900460ff161561275a5760405163769dd35360e11b815260040160405180910390fd5b6000848152600560205260409020600201546064141561278d576040516305a48e0f60e01b815260040160405180910390fd5b6001600160a01b03831660009081526004602090815260408083208784529091529020546001600160401b0316156127c4576109e3565b6001600160a01b0383166000818152600460209081526040808320888452825280832080546001600160401b031916600190811790915560058352818420600201805491820181558452919092200180546001600160a01b0319169092179091555184907f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e190612855908690615878565b60405180910390a250505050565b60008160405160200161287691906158e1565b604051602081830303815290604052805190602001209050919050565b60008281526005602052604090205482906001600160a01b0316806128cb57604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b038216146128f65780604051636c51fda960e11b815260040161097e9190615878565b600d54600160301b900460ff16156129215760405163769dd35360e11b815260040160405180910390fd5b61292a846112af565b1561294857604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b03831660009081526004602090815260408083208784529091529020546001600160401b03166129965783836040516379bfd40160e01b815260040161097e929190615a33565b6000848152600560209081526040808320600201805482518185028101850190935280835291929091908301828280156129f957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116129db575b50505050509050600060018251612a109190615d7b565b905060005b8251811015612b1c57856001600160a01b0316838281518110612a3a57612a3a615e82565b60200260200101516001600160a01b03161415612b0a576000838381518110612a6557612a65615e82565b6020026020010151905080600560008a81526020019081526020016000206002018381548110612a9757612a97615e82565b600091825260208083209190910180546001600160a01b0319166001600160a01b039490941693909317909255898152600590915260409020600201805480612ae257612ae2615e6c565b600082815260209020810160001990810180546001600160a01b031916905501905550612b1c565b80612b1481615dea565b915050612a15565b506001600160a01b03851660009081526004602090815260408083208984529091529081902080546001600160401b03191690555186907f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a7906121a8908890615878565b6000612b8e828401846154da565b9050806000015160ff16600114612bc757805160405163237d181f60e21b815260ff90911660048201526001602482015260440161097e565b8060a001516001600160601b03163414612c0b5760a08101516040516306acf13560e41b81523460048201526001600160601b03909116602482015260440161097e565b6020808201516000908152600590915260409020546001600160a01b031615612c47576040516326afa43560e11b815260040160405180910390fd5b60005b816060015151811015612ce75760016004600084606001518481518110612c7357612c73615e82565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008460200151815260200190815260200160002060006101000a8154816001600160401b0302191690836001600160401b031602179055508080612cdf90615dea565b915050612c4a565b50604080516060808201835260808401516001600160601b03908116835260a0850151811660208085019182526000858701818152828901805183526006845288832097518854955192516001600160401b0316600160c01b026001600160c01b03938816600160601b026001600160c01b0319909716919097161794909417169390931790945584518084018652868601516001600160a01b03908116825281860184815294880151828801908152925184526005865295909220825181549087166001600160a01b0319918216178255935160018201805491909716941693909317909455925180519192612de692600285019290910190614e1b565b5050506080810151600a8054600090612e099084906001600160601b0316615d26565b92506101000a8154816001600160601b0302191690836001600160601b031602179055508060a00151600a600c8282829054906101000a90046001600160601b0316612e559190615d26565b92506101000a8154816001600160601b0302191690836001600160601b031602179055506109e381602001516008613dc990919063ffffffff16565b600f8181548110612ea157600080fd5b600091825260209091200154905081565b60008281526005602052604090205482906001600160a01b031680612eea57604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b03821614612f155780604051636c51fda960e11b815260040161097e9190615878565b600d54600160301b900460ff1615612f405760405163769dd35360e11b815260040160405180910390fd5b6000848152600560205260409020600101546001600160a01b038481169116146109e3576000848152600560205260409081902060010180546001600160a01b0319166001600160a01b0386161790555184907f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a19061285590339087906158a5565b6000818152600560205260408120548190819081906060906001600160a01b031661300057604051630fb532db60e11b815260040160405180910390fd5b60008681526006602090815260408083205460058352928190208054600290910180548351818602810186019094528084526001600160601b0380871696600160601b810490911695600160c01b9091046001600160401b0316946001600160a01b03909416939183918301828280156130a357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613085575b505050505090509450945094509450945091939590929450565b6130c5613bed565b6002546001600160a01b03166130ee5760405163c1f0c0a160e01b815260040160405180910390fd5b6002546040516370a0823160e01b81526000916001600160a01b0316906370a082319061311f903090600401615878565b60206040518083038186803b15801561313757600080fd5b505afa15801561314b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061316f919061531e565b600a549091506001600160601b0316818111156131a35780826040516354ced18160e11b815260040161097e929190615902565b818110156115c85760006131b78284615d7b565b60025460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb906131ea908790859060040161588c565b602060405180830381600087803b15801561320457600080fd5b505af1158015613218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061323c91906152e8565b61325957604051631f01ff1360e21b815260040160405180910390fd5b7f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b436600848260405161328a92919061588c565b60405180910390a150505050565b600d54600160301b900460ff16156132c35760405163769dd35360e11b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b03166132f857604051630fb532db60e11b815260040160405180910390fd5b60008181526006602052604090208054600160601b90046001600160601b0316903490600c6133278385615d26565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555034600a600c8282829054906101000a90046001600160601b031661336f9190615d26565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f3f1ddc3ab1bdb39001ad76ca51a0e6f57ce6627c69f251d1de41622847721cde8234846133c29190615ce3565b6040516126c0929190615902565b6133d8613bed565b61232481613deb565b6000806133ed84613916565b60025491935091506001600160a01b03161580159061341457506001600160601b03821615155b156134c35760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906134549086906001600160601b0387169060040161588c565b602060405180830381600087803b15801561346e57600080fd5b505af1158015613482573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134a691906152e8565b6134c357604051631e9acf1760e31b815260040160405180910390fd5b6000836001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d8060008114613519576040519150601f19603f3d011682016040523d82523d6000602084013e61351e565b606091505b505090508061354057604051630dcf35db60e41b815260040160405180910390fd5b604080516001600160a01b03861681526001600160601b038581166020830152841681830152905186917f8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c4919081900360600190a25050505050565b604080516060810182526000808252602082018190529181019190915260006135c88460000151612863565b6000818152600e60205260409020549091506001600160a01b03168061360457604051631dfd6e1360e21b81526004810183905260240161097e565b600082866080015160405160200161361d929190615902565b60408051601f198184030181529181528151602092830120600081815260109093529120549091508061366357604051631b44092560e11b815260040160405180910390fd5b85516020808801516040808a015160608b015160808c015160a08d01519351613692978a979096959101615b02565b6040516020818303038152906040528051906020012081146136c75760405163354a450b60e21b815260040160405180910390fd5b60006136d68760000151613e8f565b90508061379d578651604051631d2827a760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e9413d389161372a9190600401615b6d565b60206040518083038186803b15801561374257600080fd5b505afa158015613756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061377a919061531e565b90508061379d57865160405163175dadad60e01b815261097e9190600401615b6d565b60008860800151826040516020016137bf929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c905060006137e68a83613f82565b604080516060810182529889526020890196909652948701949094525093979650505050505050565b60005a61138881101561382157600080fd5b61138881039050846040820482031161383957600080fd5b50823b61384557600080fd5b60008083516020850160008789f190505b9392505050565b6000811561388a576012546138839086908690600160201b900463ffffffff1686613fed565b90506138a4565b6012546138a1908690869063ffffffff1686614057565b90505b949350505050565b6000805b60135481101561390d57826001600160a01b0316601382815481106138d7576138d7615e82565b6000918252602090912001546001600160a01b031614156138fb5750600192915050565b8061390581615dea565b9150506138b0565b50600092915050565b6000818152600560209081526040808320815160608101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152879687969495948601939192908301828280156139a257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613984575b505050919092525050506000858152600660209081526040808320815160608101835290546001600160601b03808216808452600160601b8304909116948301859052600160c01b9091046001600160401b0316928201929092529096509094509192505b826040015151811015613a7e576004600084604001518381518110613a2e57613a2e615e82565b6020908102919091018101516001600160a01b031682528181019290925260409081016000908120898252909252902080546001600160401b031916905580613a7681615dea565b915050613a07565b50600085815260056020526040812080546001600160a01b03199081168255600182018054909116905590613ab66002830182614e80565b5050600085815260066020526040812055613ad2600886614144565b50600a8054859190600090613af19084906001600160601b0316615d92565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555082600a600c8282829054906101000a90046001600160601b0316613b399190615d92565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505050915091565b60408051602081018690526001600160a01b03851691810191909152606081018390526001600160401b03821660808201526000908190819060a00160408051601f198184030181529082905280516020918201209250613bc9918991849101615902565b60408051808303601f19018152919052805160209091012097909650945050505050565b6000546001600160a01b03163314613c405760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015260640161097e565b565b60408051602081019091526000815281613c6b5750604080516020810190915260008152610ebe565b63125fa26760e31b613c7d8385615dba565b6001600160e01b03191614613ca557604051632923fee760e11b815260040160405180910390fd5b613cb28260048186615cb9565b8101906138569190615378565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401613cf891511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b60004661a4b1811480613d45575062066eed81145b15613dc25760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d8457600080fd5b505afa158015613d98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dbc919061531e565b91505090565b4391505090565b60006138568383614150565b6000610ebe825490565b6000613856838361419f565b6001600160a01b038116331415613e3e5760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b604482015260640161097e565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60004661a4b1811480613ea4575062066eed81145b80613eb1575062066eee81145b15613f7357610100836001600160401b0316613ecb613d30565b613ed59190615d7b565b1180613ef15750613ee4613d30565b836001600160401b031610155b15613eff5750600092915050565b6040516315a03d4160e11b8152606490632b407a8290613f23908690600401615b6d565b60206040518083038186803b158015613f3b57600080fd5b505afa158015613f4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613856919061531e565b50506001600160401b03164090565b6000613fb68360000151846020015185604001518660600151868860a001518960c001518a60e001518b61010001516141c9565b60038360200151604051602001613fce929190615a4a565b60408051601f1981840301815291905280516020909101209392505050565b600080613ff86143e4565b905060005a6140078888615ce3565b6140119190615d7b565b61401b9085615d5c565b9050600061403463ffffffff871664e8d4a51000615d5c565b9050826140418284615ce3565b61404b9190615ce3565b98975050505050505050565b600080614062614440565b905060008113614088576040516321ea67b360e11b81526004810182905260240161097e565b60006140926143e4565b9050600082825a6140a38b8b615ce3565b6140ad9190615d7b565b6140b79088615d5c565b6140c19190615ce3565b6140d390670de0b6b3a7640000615d5c565b6140dd9190615d48565b905060006140f663ffffffff881664e8d4a51000615d5c565b905061410d81676765c793fa10079d601b1b615d7b565b82111561412d5760405163e80fa38160e01b815260040160405180910390fd5b6141378183615ce3565b9998505050505050505050565b6000613856838361450b565b600081815260018301602052604081205461419757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ebe565b506000610ebe565b60008260000182815481106141b6576141b6615e82565b9060005260206000200154905092915050565b6141d2896145fe565b61421b5760405162461bcd60e51b815260206004820152601a6024820152797075626c6963206b6579206973206e6f74206f6e20637572766560301b604482015260640161097e565b614224886145fe565b6142685760405162461bcd60e51b815260206004820152601560248201527467616d6d61206973206e6f74206f6e20637572766560581b604482015260640161097e565b614271836145fe565b6142bd5760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e206375727665000000604482015260640161097e565b6142c6826145fe565b6143115760405162461bcd60e51b815260206004820152601c60248201527b73486173685769746e657373206973206e6f74206f6e20637572766560201b604482015260640161097e565b61431d878a88876146c1565b6143655760405162461bcd60e51b81526020600482015260196024820152786164647228632a706b2b732a6729213d5f755769746e65737360381b604482015260640161097e565b60006143718a876147d5565b90506000614384898b878b868989614839565b90506000614395838d8d8a8661494c565b9050808a146143d65760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b604482015260640161097e565b505050505050505050505050565b60004661a4b18114806143f9575062066eed81145b1561443857606c6001600160a01b031663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d8457600080fd5b600091505090565b600d5460035460408051633fabe5a360e21b81529051600093600160381b900463ffffffff169283151592859283926001600160a01b03169163feaf968c9160048083019260a0929190829003018186803b15801561449e57600080fd5b505afa1580156144b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144d691906156b7565b5094509092508491505080156144fa57506144f18242615d7b565b8463ffffffff16105b156138a45750601154949350505050565b600081815260018301602052604081205480156145f457600061452f600183615d7b565b855490915060009061454390600190615d7b565b90508181146145a857600086600001828154811061456357614563615e82565b906000526020600020015490508087600001848154811061458657614586615e82565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806145b9576145b9615e6c565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610ebe565b6000915050610ebe565b80516000906401000003d0191161464c5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420782d6f7264696e61746560701b604482015260640161097e565b60208201516401000003d0191161469a5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420792d6f7264696e61746560701b604482015260640161097e565b60208201516401000003d0199080096146ba8360005b602002015161498c565b1492915050565b60006001600160a01b0382166147075760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b604482015260640161097e565b60208401516000906001161561471e57601c614721565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe199182039250600091908909875160408051600080825260209091019182905292935060019161478b91869188918790615910565b6020604051602081039080840390855afa1580156147ad573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b6147dd614e9e565b61480a600184846040516020016147f693929190615857565b6040516020818303038152906040526149b0565b90505b614816816145fe565b610ebe57805160408051602081019290925261483291016147f6565b905061480d565b614841614e9e565b825186516401000003d01990819006910614156148a05760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e63740000604482015260640161097e565b6148ab8789886149fe565b6148f05760405162461bcd60e51b8152602060048201526016602482015275119a5c9cdd081b5d5b0818da1958dac819985a5b195960521b604482015260640161097e565b6148fb8486856149fe565b6149415760405162461bcd60e51b815260206004820152601760248201527614d958dbdb99081b5d5b0818da1958dac819985a5b1959604a1b604482015260640161097e565b61404b868484614b19565b60006002868686858760405160200161496a969594939291906157fd565b60408051601f1981840301815291905280516020909101209695505050505050565b6000806401000003d01980848509840990506401000003d019600782089392505050565b6149b8614e9e565b6149c182614bdc565b81526149d66149d18260006146b0565b614c17565b602082018190526002900660011415611dc8576020810180516401000003d019039052919050565b600082614a3b5760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b604482015260640161097e565b83516020850151600090614a5190600290615e2c565b15614a5d57601c614a60565b601b5b9050600070014551231950b75fc4402da1732fc9bebe19838709604080516000808252602090910191829052919250600190614aa3908390869088908790615910565b6020604051602081039080840390855afa158015614ac5573d6000803e3d6000fd5b505050602060405103519050600086604051602001614ae491906157eb565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b614b21614e9e565b835160208086015185519186015160009384938493614b4293909190614c37565b919450925090506401000003d019858209600114614b9e5760405162461bcd60e51b815260206004820152601960248201527834b73b2d1036bab9ba1031329034b73b32b939b29037b3103d60391b604482015260640161097e565b60405180604001604052806401000003d01980614bbd57614bbd615e56565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d0198110611dc857604080516020808201939093528151808203840181529082019091528051910120614be4565b6000610ebe826002614c306401000003d0196001615ce3565b901c614d17565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000614c7783838585614dae565b9098509050614c8888828e88614dd2565b9098509050614c9988828c87614dd2565b90985090506000614cac8d878b85614dd2565b9098509050614cbd88828686614dae565b9098509050614cce88828e89614dd2565b9098509050818114614d03576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614d07565b8196505b5050505050509450945094915050565b600080614d22614ebc565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614d54614eda565b60208160c0846005600019fa925082614da45760405162461bcd60e51b81526020600482015260126024820152716269674d6f64457870206661696c7572652160701b604482015260640161097e565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614e70579160200282015b82811115614e7057825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614e3b565b50614e7c929150614ef8565b5090565b50805460008255906000526020600020908101906123249190614ef8565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115614e7c5760008155600101614ef9565b8035611dc881615eae565b600082601f830112614f2957600080fd5b813560206001600160401b03821115614f4457614f44615e98565b8160051b614f53828201615c89565b838152828101908684018388018501891015614f6e57600080fd5b600093505b85841015614f9a578035614f8681615eae565b835260019390930192918401918401614f73565b50979650505050505050565b600082601f830112614fb757600080fd5b614fbf615c1c565b808385604086011115614fd157600080fd5b60005b6002811015614ff3578135845260209384019390910190600101614fd4565b509095945050505050565b60008083601f84011261501057600080fd5b5081356001600160401b0381111561502757600080fd5b60208301915083602082850101111561503f57600080fd5b9250929050565b600082601f83011261505757600080fd5b81356001600160401b0381111561507057615070615e98565b615083601f8201601f1916602001615c89565b81815284602083860101111561509857600080fd5b816020850160208301376000918101602001919091529392505050565b600060c082840312156150c757600080fd5b6150cf615c44565b905081356001600160401b0380821682146150e957600080fd5b8183526020840135602084015261510260408501615168565b604084015261511360608501615168565b606084015261512460808501614f0d565b608084015260a084013591508082111561513d57600080fd5b5061514a84828501615046565b60a08301525092915050565b803561ffff81168114611dc857600080fd5b803563ffffffff81168114611dc857600080fd5b80516001600160501b0381168114611dc857600080fd5b80356001600160601b0381168114611dc857600080fd5b6000602082840312156151bc57600080fd5b813561385681615eae565b600080604083850312156151da57600080fd5b82356151e581615eae565b91506151f360208401615193565b90509250929050565b6000806040838503121561520f57600080fd5b823561521a81615eae565b9150602083013561522a81615eae565b809150509250929050565b6000806060838503121561524857600080fd5b823561525381615eae565b91506060830184101561526557600080fd5b50926020919091019150565b6000806000806060858703121561528757600080fd5b843561529281615eae565b93506020850135925060408501356001600160401b038111156152b457600080fd5b6152c087828801614ffe565b95989497509550505050565b6000604082840312156152de57600080fd5b6138568383614fa6565b6000602082840312156152fa57600080fd5b815161385681615ec3565b60006020828403121561531757600080fd5b5035919050565b60006020828403121561533057600080fd5b5051919050565b6000806020838503121561534a57600080fd5b82356001600160401b0381111561536057600080fd5b61536c85828601614ffe565b90969095509350505050565b60006020828403121561538a57600080fd5b604051602081016001600160401b03811182821017156153ac576153ac615e98565b60405282356153ba81615ec3565b81529392505050565b6000808284036101c08112156153d857600080fd5b6101a0808212156153e857600080fd5b6153f0615c66565b91506153fc8686614fa6565b825261540b8660408701614fa6565b60208301526080850135604083015260a0850135606083015260c0850135608083015261543a60e08601614f0d565b60a083015261010061544e87828801614fa6565b60c0840152615461876101408801614fa6565b60e0840152610180860135908301529092508301356001600160401b0381111561548a57600080fd5b615496858286016150b5565b9150509250929050565b6000602082840312156154b257600080fd5b81356001600160401b038111156154c857600080fd5b820160c0818503121561385657600080fd5b6000602082840312156154ec57600080fd5b81356001600160401b038082111561550357600080fd5b9083019060c0828603121561551757600080fd5b61551f615c44565b823560ff8116811461553057600080fd5b81526020838101359082015261554860408401614f0d565b604082015260608301358281111561555f57600080fd5b61556b87828601614f18565b60608301525061557d60808401615193565b608082015261558e60a08401615193565b60a082015295945050505050565b6000602082840312156155ae57600080fd5b61385682615156565b60008060008060008086880360e08112156155d157600080fd5b6155da88615156565b96506155e860208901615168565b95506155f660408901615168565b945061560460608901615168565b9350608088013592506040609f198201121561561f57600080fd5b50615628615c1c565b61563460a08901615168565b815261564260c08901615168565b6020820152809150509295509295509295565b6000806040838503121561566857600080fd5b82359150602083013561522a81615eae565b6000806040838503121561568d57600080fd5b50508035926020909101359150565b6000602082840312156156ae57600080fd5b61385682615168565b600080600080600060a086880312156156cf57600080fd5b6156d88661517c565b94506020860151935060408601519250606086015191506156fb6080870161517c565b90509295509295909350565b600081518084526020808501945080840160005b838110156157405781516001600160a01b03168752958201959082019060010161571b565b509495945050505050565b8060005b60028110156109e357815184526020938401939091019060010161574f565b600081518084526020808501945080840160005b8381101561574057815187529582019590820190600101615782565b6000815180845260005b818110156157c4576020818501810151868301820152016157a8565b818111156157d6576000602083870101525b50601f01601f19169290920160200192915050565b6157f5818361574b565b604001919050565b86815261580d602082018761574b565b61581a606082018661574b565b61582760a082018561574b565b61583460e082018461574b565b60609190911b6001600160601b0319166101208201526101340195945050505050565b838152615867602082018461574b565b606081019190915260800192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039290921682526001600160601b0316602082015260400190565b60408101610ebe828461574b565b602081526000613856602083018461576e565b918252602082015260400190565b93845260ff9290921660208401526040830152606082015260800190565b602081526000613856602083018461579e565b6020815260ff82511660208201526020820151604082015260018060a01b0360408301511660608201526000606083015160c0608084015261598660e0840182615707565b60808501516001600160601b0390811660a0868101919091529095015190941660c0909301929092525090919050565b61ffff93841681529183166020830152909116604082015260600190565b60006060820161ffff86168352602063ffffffff86168185015260606040850152818551808452608086019150828701935060005b81811015615a2557845183529383019391830191600101615a09565b509098975050505050505050565b9182526001600160a01b0316602082015260400190565b82815260608101613856602083018461574b565b8281526040602082015260006138a4604083018461576e565b86815285602082015261ffff85166040820152600063ffffffff808616606084015280851660808401525060c060a083015261404b60c083018461579e565b878152602081018790526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c082018190526000906141379083018461579e565b8781526001600160401b03871660208201526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c082018190526000906141379083018461579e565b63ffffffff92831681529116602082015260400190565b6001600160401b0391909116815260200190565b6001600160601b038681168252851660208201526001600160401b03841660408201526001600160a01b038316606082015260a060808201819052600090615bcb90830184615707565b979650505050505050565b6000808335601e19843603018112615bed57600080fd5b8301803591506001600160401b03821115615c0757600080fd5b60200191503681900382131561503f57600080fd5b604080519081016001600160401b0381118282101715615c3e57615c3e615e98565b60405290565b60405160c081016001600160401b0381118282101715615c3e57615c3e615e98565b60405161012081016001600160401b0381118282101715615c3e57615c3e615e98565b604051601f8201601f191681016001600160401b0381118282101715615cb157615cb1615e98565b604052919050565b60008085851115615cc957600080fd5b83861115615cd657600080fd5b5050820193919092039150565b60008219821115615cf657615cf6615e40565b500190565b60006001600160401b03828116848216808303821115615d1d57615d1d615e40565b01949350505050565b60006001600160601b03828116848216808303821115615d1d57615d1d615e40565b600082615d5757615d57615e56565b500490565b6000816000190483118215151615615d7657615d76615e40565b500290565b600082821015615d8d57615d8d615e40565b500390565b60006001600160601b0383811690831681811015615db257615db2615e40565b039392505050565b6001600160e01b03198135818116916004851015615de25780818660040360031b1b83161692505b505092915050565b6000600019821415615dfe57615dfe615e40565b5060010190565b60006001600160401b0382811680821415615e2257615e22615e40565b6001019392505050565b600082615e3b57615e3b615e56565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461232457600080fd5b801515811461232457600080fdfea164736f6c6343000806000a",
+}
+
+var VRFCoordinatorV2PlusUpgradedVersionABI = VRFCoordinatorV2PlusUpgradedVersionMetaData.ABI
+
+var VRFCoordinatorV2PlusUpgradedVersionBin = VRFCoordinatorV2PlusUpgradedVersionMetaData.Bin
+
+func DeployVRFCoordinatorV2PlusUpgradedVersion(auth *bind.TransactOpts, backend bind.ContractBackend, blockhashStore common.Address) (common.Address, *types.Transaction, *VRFCoordinatorV2PlusUpgradedVersion, error) {
+ parsed, err := VRFCoordinatorV2PlusUpgradedVersionMetaData.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(VRFCoordinatorV2PlusUpgradedVersionBin), backend, blockhashStore)
+ if err != nil {
+ return common.Address{}, nil, nil, err
+ }
+ return address, tx, &VRFCoordinatorV2PlusUpgradedVersion{VRFCoordinatorV2PlusUpgradedVersionCaller: VRFCoordinatorV2PlusUpgradedVersionCaller{contract: contract}, VRFCoordinatorV2PlusUpgradedVersionTransactor: VRFCoordinatorV2PlusUpgradedVersionTransactor{contract: contract}, VRFCoordinatorV2PlusUpgradedVersionFilterer: VRFCoordinatorV2PlusUpgradedVersionFilterer{contract: contract}}, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersion struct {
+ address common.Address
+ abi abi.ABI
+ VRFCoordinatorV2PlusUpgradedVersionCaller
+ VRFCoordinatorV2PlusUpgradedVersionTransactor
+ VRFCoordinatorV2PlusUpgradedVersionFilterer
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionCaller struct {
+ contract *bind.BoundContract
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionTransactor struct {
+ contract *bind.BoundContract
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionFilterer struct {
+ contract *bind.BoundContract
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSession struct {
+ Contract *VRFCoordinatorV2PlusUpgradedVersion
+ CallOpts bind.CallOpts
+ TransactOpts bind.TransactOpts
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionCallerSession struct {
+ Contract *VRFCoordinatorV2PlusUpgradedVersionCaller
+ CallOpts bind.CallOpts
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionTransactorSession struct {
+ Contract *VRFCoordinatorV2PlusUpgradedVersionTransactor
+ TransactOpts bind.TransactOpts
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionRaw struct {
+ Contract *VRFCoordinatorV2PlusUpgradedVersion
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionCallerRaw struct {
+ Contract *VRFCoordinatorV2PlusUpgradedVersionCaller
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionTransactorRaw struct {
+ Contract *VRFCoordinatorV2PlusUpgradedVersionTransactor
+}
+
+func NewVRFCoordinatorV2PlusUpgradedVersion(address common.Address, backend bind.ContractBackend) (*VRFCoordinatorV2PlusUpgradedVersion, error) {
+ abi, err := abi.JSON(strings.NewReader(VRFCoordinatorV2PlusUpgradedVersionABI))
+ if err != nil {
+ return nil, err
+ }
+ contract, err := bindVRFCoordinatorV2PlusUpgradedVersion(address, backend, backend, backend)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersion{address: address, abi: abi, VRFCoordinatorV2PlusUpgradedVersionCaller: VRFCoordinatorV2PlusUpgradedVersionCaller{contract: contract}, VRFCoordinatorV2PlusUpgradedVersionTransactor: VRFCoordinatorV2PlusUpgradedVersionTransactor{contract: contract}, VRFCoordinatorV2PlusUpgradedVersionFilterer: VRFCoordinatorV2PlusUpgradedVersionFilterer{contract: contract}}, nil
+}
+
+func NewVRFCoordinatorV2PlusUpgradedVersionCaller(address common.Address, caller bind.ContractCaller) (*VRFCoordinatorV2PlusUpgradedVersionCaller, error) {
+ contract, err := bindVRFCoordinatorV2PlusUpgradedVersion(address, caller, nil, nil)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionCaller{contract: contract}, nil
+}
+
+func NewVRFCoordinatorV2PlusUpgradedVersionTransactor(address common.Address, transactor bind.ContractTransactor) (*VRFCoordinatorV2PlusUpgradedVersionTransactor, error) {
+ contract, err := bindVRFCoordinatorV2PlusUpgradedVersion(address, nil, transactor, nil)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionTransactor{contract: contract}, nil
+}
+
+func NewVRFCoordinatorV2PlusUpgradedVersionFilterer(address common.Address, filterer bind.ContractFilterer) (*VRFCoordinatorV2PlusUpgradedVersionFilterer, error) {
+ contract, err := bindVRFCoordinatorV2PlusUpgradedVersion(address, nil, nil, filterer)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionFilterer{contract: contract}, nil
+}
+
+func bindVRFCoordinatorV2PlusUpgradedVersion(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
+ parsed, err := VRFCoordinatorV2PlusUpgradedVersionMetaData.GetAbi()
+ if err != nil {
+ return nil, err
+ }
+ return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.VRFCoordinatorV2PlusUpgradedVersionCaller.contract.Call(opts, result, method, params...)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.VRFCoordinatorV2PlusUpgradedVersionTransactor.contract.Transfer(opts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.VRFCoordinatorV2PlusUpgradedVersionTransactor.contract.Transact(opts, method, params...)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.contract.Call(opts, result, method, params...)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.contract.Transfer(opts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.contract.Transact(opts, method, params...)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) BLOCKHASHSTORE(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) BLOCKHASHSTORE() (common.Address, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.BLOCKHASHSTORE(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) BLOCKHASHSTORE() (common.Address, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.BLOCKHASHSTORE(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) LINK(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) LINK() (common.Address, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.LINK(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) LINK() (common.Address, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.LINK(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) LINKETHFEED(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.contract.Call(opts, &out, "LINK_ETH_FEED")
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) LINKETHFEED() (common.Address, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.LINKETHFEED(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) LINKETHFEED() (common.Address, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.LINKETHFEED(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) MAXCONSUMERS(opts *bind.CallOpts) (uint16, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) MAXCONSUMERS() (uint16, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.MAXCONSUMERS(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) MAXCONSUMERS() (uint16, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.MAXCONSUMERS(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) MAXNUMWORDS(opts *bind.CallOpts) (uint32, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) MAXNUMWORDS() (uint32, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.MAXNUMWORDS(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) MAXNUMWORDS() (uint32, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.MAXNUMWORDS(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) MAXREQUESTCONFIRMATIONS(opts *bind.CallOpts) (uint16, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) MAXREQUESTCONFIRMATIONS() (uint16, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.MAXREQUESTCONFIRMATIONS(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) MAXREQUESTCONFIRMATIONS() (uint16, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.MAXREQUESTCONFIRMATIONS(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) GetActiveSubscriptionIds(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) GetActiveSubscriptionIds(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.GetActiveSubscriptionIds(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, startIndex, maxCount)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) GetActiveSubscriptionIds(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.GetActiveSubscriptionIds(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, startIndex, maxCount)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) GetRequestConfig(opts *bind.CallOpts) (uint16, uint32, [][32]byte, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.contract.Call(opts, &out, "getRequestConfig")
+
+ if err != nil {
+ return *new(uint16), *new(uint32), *new([][32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16)
+ out1 := *abi.ConvertType(out[1], new(uint32)).(*uint32)
+ out2 := *abi.ConvertType(out[2], new([][32]byte)).(*[][32]byte)
+
+ return out0, out1, out2, err
+
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) GetRequestConfig() (uint16, uint32, [][32]byte, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.GetRequestConfig(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) GetRequestConfig() (uint16, uint32, [][32]byte, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.GetRequestConfig(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) GetSubscription(opts *bind.CallOpts, subId *big.Int) (GetSubscription,
+
+ error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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.EthBalance = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
+ outstruct.ReqCount = *abi.ConvertType(out[2], new(uint64)).(*uint64)
+ outstruct.Owner = *abi.ConvertType(out[3], new(common.Address)).(*common.Address)
+ outstruct.Consumers = *abi.ConvertType(out[4], new([]common.Address)).(*[]common.Address)
+
+ return *outstruct, err
+
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) GetSubscription(subId *big.Int) (GetSubscription,
+
+ error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.GetSubscription(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) GetSubscription(subId *big.Int) (GetSubscription,
+
+ error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.GetSubscription(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) HashOfKey(opts *bind.CallOpts, publicKey [2]*big.Int) ([32]byte, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) HashOfKey(publicKey [2]*big.Int) ([32]byte, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.HashOfKey(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, publicKey)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) HashOfKey(publicKey [2]*big.Int) ([32]byte, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.HashOfKey(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, publicKey)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) MigrationVersion(opts *bind.CallOpts) (uint8, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.contract.Call(opts, &out, "migrationVersion")
+
+ if err != nil {
+ return *new(uint8), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
+
+ return out0, err
+
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) MigrationVersion() (uint8, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.MigrationVersion(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) MigrationVersion() (uint8, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.MigrationVersion(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) Owner() (common.Address, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.Owner(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) Owner() (common.Address, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.Owner(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) PendingRequestExists(opts *bind.CallOpts, subId *big.Int) (bool, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) PendingRequestExists(subId *big.Int) (bool, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.PendingRequestExists(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) PendingRequestExists(subId *big.Int) (bool, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.PendingRequestExists(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) SConfig(opts *bind.CallOpts) (SConfig,
+
+ error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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)
+
+ return *outstruct, err
+
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) SConfig() (SConfig,
+
+ error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SConfig(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) SConfig() (SConfig,
+
+ error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SConfig(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) SCurrentSubNonce(opts *bind.CallOpts) (uint64, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) SCurrentSubNonce() (uint64, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SCurrentSubNonce(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) SCurrentSubNonce() (uint64, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SCurrentSubNonce(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) SFallbackWeiPerUnitLink(opts *bind.CallOpts) (*big.Int, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) SFallbackWeiPerUnitLink() (*big.Int, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SFallbackWeiPerUnitLink(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) SFallbackWeiPerUnitLink() (*big.Int, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SFallbackWeiPerUnitLink(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) SFeeConfig(opts *bind.CallOpts) (SFeeConfig,
+
+ error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.contract.Call(opts, &out, "s_feeConfig")
+
+ outstruct := new(SFeeConfig)
+ if err != nil {
+ return *outstruct, err
+ }
+
+ outstruct.FulfillmentFlatFeeLinkPPM = *abi.ConvertType(out[0], new(uint32)).(*uint32)
+ outstruct.FulfillmentFlatFeeEthPPM = *abi.ConvertType(out[1], new(uint32)).(*uint32)
+
+ return *outstruct, err
+
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) SFeeConfig() (SFeeConfig,
+
+ error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SFeeConfig(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) SFeeConfig() (SFeeConfig,
+
+ error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SFeeConfig(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) SProvingKeyHashes(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) SProvingKeyHashes(arg0 *big.Int) ([32]byte, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SProvingKeyHashes(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, arg0)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) SProvingKeyHashes(arg0 *big.Int) ([32]byte, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SProvingKeyHashes(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, arg0)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) SProvingKeys(opts *bind.CallOpts, arg0 [32]byte) (common.Address, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.contract.Call(opts, &out, "s_provingKeys", arg0)
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) SProvingKeys(arg0 [32]byte) (common.Address, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SProvingKeys(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, arg0)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) SProvingKeys(arg0 [32]byte) (common.Address, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SProvingKeys(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, arg0)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) SRequestCommitments(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) SRequestCommitments(arg0 *big.Int) ([32]byte, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SRequestCommitments(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, arg0)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) SRequestCommitments(arg0 *big.Int) ([32]byte, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SRequestCommitments(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts, arg0)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) STotalBalance(opts *bind.CallOpts) (*big.Int, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) STotalBalance() (*big.Int, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.STotalBalance(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) STotalBalance() (*big.Int, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.STotalBalance(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCaller) STotalEthBalance(opts *bind.CallOpts) (*big.Int, error) {
+ var out []interface{}
+ err := _VRFCoordinatorV2PlusUpgradedVersion.contract.Call(opts, &out, "s_totalEthBalance")
+
+ if err != nil {
+ return *new(*big.Int), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+
+ return out0, err
+
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) STotalEthBalance() (*big.Int, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.STotalEthBalance(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionCallerSession) STotalEthBalance() (*big.Int, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.STotalEthBalance(&_VRFCoordinatorV2PlusUpgradedVersion.CallOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "acceptOwnership")
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) AcceptOwnership() (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.AcceptOwnership(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) AcceptOwnership() (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.AcceptOwnership(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) AcceptSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "acceptSubscriptionOwnerTransfer", subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) AcceptSubscriptionOwnerTransfer(subId *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.AcceptSubscriptionOwnerTransfer(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) AcceptSubscriptionOwnerTransfer(subId *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.AcceptSubscriptionOwnerTransfer(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) AddConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "addConsumer", subId, consumer)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) AddConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.AddConsumer(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId, consumer)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) AddConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.AddConsumer(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId, consumer)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) CancelSubscription(opts *bind.TransactOpts, subId *big.Int, to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "cancelSubscription", subId, to)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) CancelSubscription(subId *big.Int, to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.CancelSubscription(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId, to)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) CancelSubscription(subId *big.Int, to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.CancelSubscription(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId, to)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) CreateSubscription(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "createSubscription")
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) CreateSubscription() (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.CreateSubscription(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) CreateSubscription() (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.CreateSubscription(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) FulfillRandomWords(opts *bind.TransactOpts, proof VRFProof, rc VRFCoordinatorV2PlusUpgradedVersionRequestCommitment) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "fulfillRandomWords", proof, rc)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) FulfillRandomWords(proof VRFProof, rc VRFCoordinatorV2PlusUpgradedVersionRequestCommitment) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.FulfillRandomWords(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, proof, rc)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) FulfillRandomWords(proof VRFProof, rc VRFCoordinatorV2PlusUpgradedVersionRequestCommitment) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.FulfillRandomWords(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, proof, rc)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) FundSubscriptionWithEth(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "fundSubscriptionWithEth", subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) FundSubscriptionWithEth(subId *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.FundSubscriptionWithEth(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) FundSubscriptionWithEth(subId *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.FundSubscriptionWithEth(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) Migrate(opts *bind.TransactOpts, subId *big.Int, newCoordinator common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "migrate", subId, newCoordinator)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) Migrate(subId *big.Int, newCoordinator common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.Migrate(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId, newCoordinator)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) Migrate(subId *big.Int, newCoordinator common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.Migrate(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId, newCoordinator)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) OnMigration(opts *bind.TransactOpts, encodedData []byte) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "onMigration", encodedData)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) OnMigration(encodedData []byte) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.OnMigration(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, encodedData)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) OnMigration(encodedData []byte) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.OnMigration(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, encodedData)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "onTokenTransfer", arg0, amount, data)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) OnTokenTransfer(arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.OnTokenTransfer(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, arg0, amount, data)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) OnTokenTransfer(arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.OnTokenTransfer(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, arg0, amount, data)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) OracleWithdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "oracleWithdraw", recipient, amount)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) OracleWithdraw(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.OracleWithdraw(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, recipient, amount)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) OracleWithdraw(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.OracleWithdraw(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, recipient, amount)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) OracleWithdrawEth(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "oracleWithdrawEth", recipient, amount)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) OracleWithdrawEth(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.OracleWithdrawEth(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, recipient, amount)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) OracleWithdrawEth(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.OracleWithdrawEth(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, recipient, amount)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) OwnerCancelSubscription(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "ownerCancelSubscription", subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) OwnerCancelSubscription(subId *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.OwnerCancelSubscription(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) OwnerCancelSubscription(subId *big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.OwnerCancelSubscription(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) RecoverEthFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "recoverEthFunds", to)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) RecoverEthFunds(to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RecoverEthFunds(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, to)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) RecoverEthFunds(to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RecoverEthFunds(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, to)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) RecoverFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "recoverFunds", to)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) RecoverFunds(to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RecoverFunds(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, to)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) RecoverFunds(to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RecoverFunds(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, to)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) RegisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "registerMigratableCoordinator", target)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) RegisterMigratableCoordinator(target common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RegisterMigratableCoordinator(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, target)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) RegisterMigratableCoordinator(target common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RegisterMigratableCoordinator(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, target)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) RegisterProvingKey(opts *bind.TransactOpts, oracle common.Address, publicProvingKey [2]*big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "registerProvingKey", oracle, publicProvingKey)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) RegisterProvingKey(oracle common.Address, publicProvingKey [2]*big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RegisterProvingKey(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, oracle, publicProvingKey)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) RegisterProvingKey(oracle common.Address, publicProvingKey [2]*big.Int) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RegisterProvingKey(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, oracle, publicProvingKey)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) RemoveConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "removeConsumer", subId, consumer)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) RemoveConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RemoveConsumer(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId, consumer)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) RemoveConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RemoveConsumer(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId, consumer)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) RequestRandomWords(opts *bind.TransactOpts, req VRFV2PlusClientRandomWordsRequest) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "requestRandomWords", req)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) RequestRandomWords(req VRFV2PlusClientRandomWordsRequest) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RequestRandomWords(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, req)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) RequestRandomWords(req VRFV2PlusClientRandomWordsRequest) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RequestRandomWords(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, req)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) RequestSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int, newOwner common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "requestSubscriptionOwnerTransfer", subId, newOwner)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) RequestSubscriptionOwnerTransfer(subId *big.Int, newOwner common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RequestSubscriptionOwnerTransfer(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId, newOwner)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) RequestSubscriptionOwnerTransfer(subId *big.Int, newOwner common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.RequestSubscriptionOwnerTransfer(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, subId, newOwner)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) SetConfig(opts *bind.TransactOpts, minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, feeConfig VRFCoordinatorV2PlusUpgradedVersionFeeConfig) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "setConfig", minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, feeConfig)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) SetConfig(minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, feeConfig VRFCoordinatorV2PlusUpgradedVersionFeeConfig) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SetConfig(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, feeConfig)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) SetConfig(minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, feeConfig VRFCoordinatorV2PlusUpgradedVersionFeeConfig) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SetConfig(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, feeConfig)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) SetLINKAndLINKETHFeed(opts *bind.TransactOpts, link common.Address, linkEthFeed common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "setLINKAndLINKETHFeed", link, linkEthFeed)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) SetLINKAndLINKETHFeed(link common.Address, linkEthFeed common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SetLINKAndLINKETHFeed(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, link, linkEthFeed)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) SetLINKAndLINKETHFeed(link common.Address, linkEthFeed common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.SetLINKAndLINKETHFeed(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, link, linkEthFeed)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.contract.Transact(opts, "transferOwnership", to)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionSession) TransferOwnership(to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.TransferOwnership(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, to)
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) {
+ return _VRFCoordinatorV2PlusUpgradedVersion.Contract.TransferOwnership(&_VRFCoordinatorV2PlusUpgradedVersion.TransactOpts, to)
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionConfigSetIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionConfigSet
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionConfigSetIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionConfigSet)
+ 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(VRFCoordinatorV2PlusUpgradedVersionConfigSet)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionConfigSetIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionConfigSetIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionConfigSet struct {
+ MinimumRequestConfirmations uint16
+ MaxGasLimit uint32
+ StalenessSeconds uint32
+ GasAfterPaymentCalculation uint32
+ FallbackWeiPerUnitLink *big.Int
+ FeeConfig VRFCoordinatorV2PlusUpgradedVersionFeeConfig
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterConfigSet(opts *bind.FilterOpts) (*VRFCoordinatorV2PlusUpgradedVersionConfigSetIterator, error) {
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "ConfigSet")
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionConfigSetIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "ConfigSet", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionConfigSet) (event.Subscription, error) {
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionConfigSet)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseConfigSet(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionConfigSet, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionConfigSet)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "ConfigSet", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegisteredIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegistered
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegisteredIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegistered)
+ 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(VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegistered)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegisteredIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegisteredIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegistered struct {
+ CoordinatorAddress common.Address
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterCoordinatorRegistered(opts *bind.FilterOpts) (*VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegisteredIterator, error) {
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "CoordinatorRegistered")
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegisteredIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "CoordinatorRegistered", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchCoordinatorRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegistered) (event.Subscription, error) {
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegistered)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseCoordinatorRegistered(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegistered, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegistered)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "CoordinatorRegistered", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionEthFundsRecoveredIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionEthFundsRecovered
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionEthFundsRecoveredIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionEthFundsRecovered)
+ 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(VRFCoordinatorV2PlusUpgradedVersionEthFundsRecovered)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionEthFundsRecoveredIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionEthFundsRecoveredIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionEthFundsRecovered struct {
+ To common.Address
+ Amount *big.Int
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterEthFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV2PlusUpgradedVersionEthFundsRecoveredIterator, error) {
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "EthFundsRecovered")
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionEthFundsRecoveredIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "EthFundsRecovered", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchEthFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionEthFundsRecovered) (event.Subscription, error) {
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.WatchLogs(opts, "EthFundsRecovered")
+ if err != nil {
+ return nil, err
+ }
+ return event.NewSubscription(func(quit <-chan struct{}) error {
+ defer sub.Unsubscribe()
+ for {
+ select {
+ case log := <-logs:
+
+ event := new(VRFCoordinatorV2PlusUpgradedVersionEthFundsRecovered)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "EthFundsRecovered", 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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseEthFundsRecovered(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionEthFundsRecovered, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionEthFundsRecovered)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "EthFundsRecovered", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionFundsRecoveredIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionFundsRecovered
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionFundsRecoveredIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionFundsRecovered)
+ 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(VRFCoordinatorV2PlusUpgradedVersionFundsRecovered)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionFundsRecoveredIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionFundsRecoveredIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionFundsRecovered struct {
+ To common.Address
+ Amount *big.Int
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV2PlusUpgradedVersionFundsRecoveredIterator, error) {
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "FundsRecovered")
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionFundsRecoveredIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "FundsRecovered", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionFundsRecovered) (event.Subscription, error) {
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionFundsRecovered)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseFundsRecovered(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionFundsRecovered, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionFundsRecovered)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "FundsRecovered", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionMigrationCompletedIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionMigrationCompletedIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted)
+ 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(VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionMigrationCompletedIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionMigrationCompletedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted struct {
+ NewCoordinator common.Address
+ SubId *big.Int
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterMigrationCompleted(opts *bind.FilterOpts) (*VRFCoordinatorV2PlusUpgradedVersionMigrationCompletedIterator, error) {
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "MigrationCompleted")
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionMigrationCompletedIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "MigrationCompleted", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchMigrationCompleted(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted) (event.Subscription, error) {
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseMigrationCompleted(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "MigrationCompleted", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequestedIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequested
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequestedIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequested)
+ 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(VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequested)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequestedIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequestedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequested struct {
+ From common.Address
+ To common.Address
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequestedIterator, 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 := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequestedIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequested, 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 := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequested)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseOwnershipTransferRequested(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequested, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequested)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferredIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferred
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferredIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferred)
+ 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(VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferred)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferredIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferredIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferred struct {
+ From common.Address
+ To common.Address
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferredIterator, 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 := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferredIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferred, 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 := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferred)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseOwnershipTransferred(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferred, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferred)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegisteredIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegistered
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegisteredIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegistered)
+ 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(VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegistered)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegisteredIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegisteredIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegistered struct {
+ KeyHash [32]byte
+ Oracle common.Address
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterProvingKeyRegistered(opts *bind.FilterOpts, oracle []common.Address) (*VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegisteredIterator, error) {
+
+ var oracleRule []interface{}
+ for _, oracleItem := range oracle {
+ oracleRule = append(oracleRule, oracleItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "ProvingKeyRegistered", oracleRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegisteredIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "ProvingKeyRegistered", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchProvingKeyRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegistered, oracle []common.Address) (event.Subscription, error) {
+
+ var oracleRule []interface{}
+ for _, oracleItem := range oracle {
+ oracleRule = append(oracleRule, oracleItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.WatchLogs(opts, "ProvingKeyRegistered", oracleRule)
+ if err != nil {
+ return nil, err
+ }
+ return event.NewSubscription(func(quit <-chan struct{}) error {
+ defer sub.Unsubscribe()
+ for {
+ select {
+ case log := <-logs:
+
+ event := new(VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegistered)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseProvingKeyRegistered(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegistered, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegistered)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "ProvingKeyRegistered", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilledIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilledIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled)
+ 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(VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilledIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilledIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled struct {
+ RequestId *big.Int
+ OutputSeed *big.Int
+ SubID *big.Int
+ Payment *big.Int
+ Success bool
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterRandomWordsFulfilled(opts *bind.FilterOpts, requestId []*big.Int, subID []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilledIterator, 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 := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "RandomWordsFulfilled", requestIdRule, subIDRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilledIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "RandomWordsFulfilled", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled, 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 := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseRandomWordsFulfilled(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "RandomWordsFulfilled", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequestedIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequestedIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested)
+ 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(VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequestedIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequestedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested 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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterRandomWordsRequested(opts *bind.FilterOpts, keyHash [][32]byte, subId []*big.Int, sender []common.Address) (*VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequestedIterator, 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 := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "RandomWordsRequested", keyHashRule, subIdRule, senderRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequestedIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "RandomWordsRequested", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchRandomWordsRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested, 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 := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseRandomWordsRequested(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "RandomWordsRequested", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceledIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceled
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceledIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceled)
+ 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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceled)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceledIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceledIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceled struct {
+ SubId *big.Int
+ To common.Address
+ AmountLink *big.Int
+ AmountEth *big.Int
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterSubscriptionCanceled(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceledIterator, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "SubscriptionCanceled", subIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceledIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "SubscriptionCanceled", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchSubscriptionCanceled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceled, subId []*big.Int) (event.Subscription, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceled)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseSubscriptionCanceled(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceled, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceled)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "SubscriptionCanceled", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAddedIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAdded
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAddedIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAdded)
+ 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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAdded)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAddedIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAddedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAdded struct {
+ SubId *big.Int
+ Consumer common.Address
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterSubscriptionConsumerAdded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAddedIterator, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "SubscriptionConsumerAdded", subIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAddedIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "SubscriptionConsumerAdded", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchSubscriptionConsumerAdded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAdded, subId []*big.Int) (event.Subscription, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAdded)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseSubscriptionConsumerAdded(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAdded, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAdded)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "SubscriptionConsumerAdded", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemovedIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemoved
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemovedIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemoved)
+ 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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemoved)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemovedIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemovedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemoved struct {
+ SubId *big.Int
+ Consumer common.Address
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterSubscriptionConsumerRemoved(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemovedIterator, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "SubscriptionConsumerRemoved", subIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemovedIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "SubscriptionConsumerRemoved", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchSubscriptionConsumerRemoved(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemoved, subId []*big.Int) (event.Subscription, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemoved)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseSubscriptionConsumerRemoved(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemoved, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemoved)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "SubscriptionConsumerRemoved", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreatedIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreated
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreatedIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreated)
+ 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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreated)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreatedIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreatedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreated struct {
+ SubId *big.Int
+ Owner common.Address
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterSubscriptionCreated(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreatedIterator, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "SubscriptionCreated", subIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreatedIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "SubscriptionCreated", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchSubscriptionCreated(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreated, subId []*big.Int) (event.Subscription, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreated)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseSubscriptionCreated(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreated, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreated)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "SubscriptionCreated", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFunded
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionFunded)
+ 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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionFunded)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionFunded struct {
+ SubId *big.Int
+ OldBalance *big.Int
+ NewBalance *big.Int
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterSubscriptionFunded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedIterator, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "SubscriptionFunded", subIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "SubscriptionFunded", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchSubscriptionFunded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFunded, subId []*big.Int) (event.Subscription, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionFunded)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseSubscriptionFunded(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionFunded, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionFunded)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "SubscriptionFunded", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEthIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEth
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEthIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEth)
+ 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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEth)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEthIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEthIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEth struct {
+ SubId *big.Int
+ OldEthBalance *big.Int
+ NewEthBalance *big.Int
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterSubscriptionFundedWithEth(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEthIterator, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "SubscriptionFundedWithEth", subIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEthIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "SubscriptionFundedWithEth", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchSubscriptionFundedWithEth(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEth, subId []*big.Int) (event.Subscription, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.WatchLogs(opts, "SubscriptionFundedWithEth", 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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEth)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "SubscriptionFundedWithEth", 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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseSubscriptionFundedWithEth(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEth, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEth)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "SubscriptionFundedWithEth", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequestedIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequested
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequestedIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequested)
+ 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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequested)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequestedIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequestedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequested struct {
+ SubId *big.Int
+ From common.Address
+ To common.Address
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterSubscriptionOwnerTransferRequested(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequestedIterator, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "SubscriptionOwnerTransferRequested", subIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequestedIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "SubscriptionOwnerTransferRequested", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchSubscriptionOwnerTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequested, subId []*big.Int) (event.Subscription, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequested)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseSubscriptionOwnerTransferRequested(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequested, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequested)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "SubscriptionOwnerTransferRequested", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferredIterator struct {
+ Event *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferred
+
+ contract *bind.BoundContract
+ event string
+
+ logs chan types.Log
+ sub ethereum.Subscription
+ done bool
+ fail error
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferredIterator) Next() bool {
+
+ if it.fail != nil {
+ return false
+ }
+
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferred)
+ 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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferred)
+ 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 *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferredIterator) Error() error {
+ return it.fail
+}
+
+func (it *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferredIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferred struct {
+ SubId *big.Int
+ From common.Address
+ To common.Address
+ Raw types.Log
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) FilterSubscriptionOwnerTransferred(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferredIterator, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.contract.FilterLogs(opts, "SubscriptionOwnerTransferred", subIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferredIterator{contract: _VRFCoordinatorV2PlusUpgradedVersion.contract, event: "SubscriptionOwnerTransferred", logs: logs, sub: sub}, nil
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) WatchSubscriptionOwnerTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferred, subId []*big.Int) (event.Subscription, error) {
+
+ var subIdRule []interface{}
+ for _, subIdItem := range subId {
+ subIdRule = append(subIdRule, subIdItem)
+ }
+
+ logs, sub, err := _VRFCoordinatorV2PlusUpgradedVersion.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(VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferred)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.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 (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersionFilterer) ParseSubscriptionOwnerTransferred(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferred, error) {
+ event := new(VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferred)
+ if err := _VRFCoordinatorV2PlusUpgradedVersion.contract.UnpackLog(event, "SubscriptionOwnerTransferred", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+type GetSubscription struct {
+ Balance *big.Int
+ EthBalance *big.Int
+ ReqCount uint64
+ Owner common.Address
+ Consumers []common.Address
+}
+type SConfig struct {
+ MinimumRequestConfirmations uint16
+ MaxGasLimit uint32
+ ReentrancyLock bool
+ StalenessSeconds uint32
+ GasAfterPaymentCalculation uint32
+}
+type SFeeConfig struct {
+ FulfillmentFlatFeeLinkPPM uint32
+ FulfillmentFlatFeeEthPPM uint32
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersion) ParseLog(log types.Log) (generated.AbigenLog, error) {
+ switch log.Topics[0] {
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["ConfigSet"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseConfigSet(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["CoordinatorRegistered"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseCoordinatorRegistered(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["EthFundsRecovered"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseEthFundsRecovered(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["FundsRecovered"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseFundsRecovered(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["MigrationCompleted"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseMigrationCompleted(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["OwnershipTransferRequested"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseOwnershipTransferRequested(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["OwnershipTransferred"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseOwnershipTransferred(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["ProvingKeyRegistered"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseProvingKeyRegistered(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["RandomWordsFulfilled"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseRandomWordsFulfilled(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["RandomWordsRequested"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseRandomWordsRequested(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["SubscriptionCanceled"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseSubscriptionCanceled(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["SubscriptionConsumerAdded"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseSubscriptionConsumerAdded(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["SubscriptionConsumerRemoved"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseSubscriptionConsumerRemoved(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["SubscriptionCreated"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseSubscriptionCreated(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["SubscriptionFunded"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseSubscriptionFunded(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["SubscriptionFundedWithEth"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseSubscriptionFundedWithEth(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["SubscriptionOwnerTransferRequested"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseSubscriptionOwnerTransferRequested(log)
+ case _VRFCoordinatorV2PlusUpgradedVersion.abi.Events["SubscriptionOwnerTransferred"].ID:
+ return _VRFCoordinatorV2PlusUpgradedVersion.ParseSubscriptionOwnerTransferred(log)
+
+ default:
+ return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0])
+ }
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionConfigSet) Topic() common.Hash {
+ return common.HexToHash("0x777357bb93f63d088f18112d3dba38457aec633eb8f1341e1d418380ad328e78")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegistered) Topic() common.Hash {
+ return common.HexToHash("0xb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af01625")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionEthFundsRecovered) Topic() common.Hash {
+ return common.HexToHash("0x879c9ea2b9d5345b84ccd12610b032602808517cebdb795007f3dcb4df377317")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionFundsRecovered) Topic() common.Hash {
+ return common.HexToHash("0x59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b436600")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted) Topic() common.Hash {
+ return common.HexToHash("0xd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be4187")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequested) Topic() common.Hash {
+ return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferred) Topic() common.Hash {
+ return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegistered) Topic() common.Hash {
+ return common.HexToHash("0xe729ae16526293f74ade739043022254f1489f616295a25bf72dfb4511ed73b8")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled) Topic() common.Hash {
+ return common.HexToHash("0x49580fdfd9497e1ed5c1b1cec0495087ae8e3f1267470ec2fb015db32e3d6aa7")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested) Topic() common.Hash {
+ return common.HexToHash("0xeb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceled) Topic() common.Hash {
+ return common.HexToHash("0x8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c4")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAdded) Topic() common.Hash {
+ return common.HexToHash("0x1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e1")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemoved) Topic() common.Hash {
+ return common.HexToHash("0x32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a7")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreated) Topic() common.Hash {
+ return common.HexToHash("0x1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionSubscriptionFunded) Topic() common.Hash {
+ return common.HexToHash("0x1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEth) Topic() common.Hash {
+ return common.HexToHash("0x3f1ddc3ab1bdb39001ad76ca51a0e6f57ce6627c69f251d1de41622847721cde")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequested) Topic() common.Hash {
+ return common.HexToHash("0x21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a1")
+}
+
+func (VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferred) Topic() common.Hash {
+ return common.HexToHash("0xd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c9386")
+}
+
+func (_VRFCoordinatorV2PlusUpgradedVersion *VRFCoordinatorV2PlusUpgradedVersion) Address() common.Address {
+ return _VRFCoordinatorV2PlusUpgradedVersion.address
+}
+
+type VRFCoordinatorV2PlusUpgradedVersionInterface interface {
+ BLOCKHASHSTORE(opts *bind.CallOpts) (common.Address, error)
+
+ LINK(opts *bind.CallOpts) (common.Address, error)
+
+ LINKETHFEED(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)
+
+ GetRequestConfig(opts *bind.CallOpts) (uint16, uint32, [][32]byte, error)
+
+ GetSubscription(opts *bind.CallOpts, subId *big.Int) (GetSubscription,
+
+ error)
+
+ HashOfKey(opts *bind.CallOpts, publicKey [2]*big.Int) ([32]byte, error)
+
+ MigrationVersion(opts *bind.CallOpts) (uint8, 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)
+
+ SFeeConfig(opts *bind.CallOpts) (SFeeConfig,
+
+ error)
+
+ SProvingKeyHashes(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error)
+
+ SProvingKeys(opts *bind.CallOpts, arg0 [32]byte) (common.Address, error)
+
+ SRequestCommitments(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error)
+
+ STotalBalance(opts *bind.CallOpts) (*big.Int, error)
+
+ STotalEthBalance(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)
+
+ FulfillRandomWords(opts *bind.TransactOpts, proof VRFProof, rc VRFCoordinatorV2PlusUpgradedVersionRequestCommitment) (*types.Transaction, error)
+
+ FundSubscriptionWithEth(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error)
+
+ Migrate(opts *bind.TransactOpts, subId *big.Int, newCoordinator common.Address) (*types.Transaction, error)
+
+ OnMigration(opts *bind.TransactOpts, encodedData []byte) (*types.Transaction, error)
+
+ OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error)
+
+ OracleWithdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error)
+
+ OracleWithdrawEth(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error)
+
+ OwnerCancelSubscription(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error)
+
+ RecoverEthFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error)
+
+ RecoverFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error)
+
+ RegisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error)
+
+ RegisterProvingKey(opts *bind.TransactOpts, oracle common.Address, publicProvingKey [2]*big.Int) (*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, feeConfig VRFCoordinatorV2PlusUpgradedVersionFeeConfig) (*types.Transaction, error)
+
+ SetLINKAndLINKETHFeed(opts *bind.TransactOpts, link common.Address, linkEthFeed common.Address) (*types.Transaction, error)
+
+ TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error)
+
+ FilterConfigSet(opts *bind.FilterOpts) (*VRFCoordinatorV2PlusUpgradedVersionConfigSetIterator, error)
+
+ WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionConfigSet) (event.Subscription, error)
+
+ ParseConfigSet(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionConfigSet, error)
+
+ FilterCoordinatorRegistered(opts *bind.FilterOpts) (*VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegisteredIterator, error)
+
+ WatchCoordinatorRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegistered) (event.Subscription, error)
+
+ ParseCoordinatorRegistered(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionCoordinatorRegistered, error)
+
+ FilterEthFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV2PlusUpgradedVersionEthFundsRecoveredIterator, error)
+
+ WatchEthFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionEthFundsRecovered) (event.Subscription, error)
+
+ ParseEthFundsRecovered(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionEthFundsRecovered, error)
+
+ FilterFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV2PlusUpgradedVersionFundsRecoveredIterator, error)
+
+ WatchFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionFundsRecovered) (event.Subscription, error)
+
+ ParseFundsRecovered(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionFundsRecovered, error)
+
+ FilterMigrationCompleted(opts *bind.FilterOpts) (*VRFCoordinatorV2PlusUpgradedVersionMigrationCompletedIterator, error)
+
+ WatchMigrationCompleted(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted) (event.Subscription, error)
+
+ ParseMigrationCompleted(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted, error)
+
+ FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequestedIterator, error)
+
+ WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error)
+
+ ParseOwnershipTransferRequested(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferRequested, error)
+
+ FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferredIterator, error)
+
+ WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error)
+
+ ParseOwnershipTransferred(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionOwnershipTransferred, error)
+
+ FilterProvingKeyRegistered(opts *bind.FilterOpts, oracle []common.Address) (*VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegisteredIterator, error)
+
+ WatchProvingKeyRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegistered, oracle []common.Address) (event.Subscription, error)
+
+ ParseProvingKeyRegistered(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionProvingKeyRegistered, error)
+
+ FilterRandomWordsFulfilled(opts *bind.FilterOpts, requestId []*big.Int, subID []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilledIterator, error)
+
+ WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled, requestId []*big.Int, subID []*big.Int) (event.Subscription, error)
+
+ ParseRandomWordsFulfilled(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled, error)
+
+ FilterRandomWordsRequested(opts *bind.FilterOpts, keyHash [][32]byte, subId []*big.Int, sender []common.Address) (*VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequestedIterator, error)
+
+ WatchRandomWordsRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested, keyHash [][32]byte, subId []*big.Int, sender []common.Address) (event.Subscription, error)
+
+ ParseRandomWordsRequested(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested, error)
+
+ FilterSubscriptionCanceled(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceledIterator, error)
+
+ WatchSubscriptionCanceled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceled, subId []*big.Int) (event.Subscription, error)
+
+ ParseSubscriptionCanceled(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionCanceled, error)
+
+ FilterSubscriptionConsumerAdded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAddedIterator, error)
+
+ WatchSubscriptionConsumerAdded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAdded, subId []*big.Int) (event.Subscription, error)
+
+ ParseSubscriptionConsumerAdded(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerAdded, error)
+
+ FilterSubscriptionConsumerRemoved(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemovedIterator, error)
+
+ WatchSubscriptionConsumerRemoved(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemoved, subId []*big.Int) (event.Subscription, error)
+
+ ParseSubscriptionConsumerRemoved(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionConsumerRemoved, error)
+
+ FilterSubscriptionCreated(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreatedIterator, error)
+
+ WatchSubscriptionCreated(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreated, subId []*big.Int) (event.Subscription, error)
+
+ ParseSubscriptionCreated(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionCreated, error)
+
+ FilterSubscriptionFunded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedIterator, error)
+
+ WatchSubscriptionFunded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFunded, subId []*big.Int) (event.Subscription, error)
+
+ ParseSubscriptionFunded(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionFunded, error)
+
+ FilterSubscriptionFundedWithEth(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEthIterator, error)
+
+ WatchSubscriptionFundedWithEth(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEth, subId []*big.Int) (event.Subscription, error)
+
+ ParseSubscriptionFundedWithEth(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionFundedWithEth, error)
+
+ FilterSubscriptionOwnerTransferRequested(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequestedIterator, error)
+
+ WatchSubscriptionOwnerTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequested, subId []*big.Int) (event.Subscription, error)
+
+ ParseSubscriptionOwnerTransferRequested(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferRequested, error)
+
+ FilterSubscriptionOwnerTransferred(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferredIterator, error)
+
+ WatchSubscriptionOwnerTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferred, subId []*big.Int) (event.Subscription, error)
+
+ ParseSubscriptionOwnerTransferred(log types.Log) (*VRFCoordinatorV2PlusUpgradedVersionSubscriptionOwnerTransferred, error)
+
+ ParseLog(log types.Log) (generated.AbigenLog, error)
+
+ Address() common.Address
+}
diff --git a/core/gethwrappers/generated/vrfv2plus_client/vrfv2plus_client.go b/core/gethwrappers/generated/vrfv2plus_client/vrfv2plus_client.go
index 91112ff856..9fd983e2cf 100644
--- a/core/gethwrappers/generated/vrfv2plus_client/vrfv2plus_client.go
+++ b/core/gethwrappers/generated/vrfv2plus_client/vrfv2plus_client.go
@@ -30,7 +30,7 @@ var (
var VRFV2PlusClientMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"name\":\"EXTRA_ARGS_V1_TAG\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
- Bin: "0x60a0610038600b82828239805160001a607314602b57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063f7514ab4146038575b600080fd5b605e7f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa81565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200160405180910390f3fea164736f6c6343000806000a",
+ Bin: "0x6088610038600b82828239805160001a607314602b57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063f7514ab4146038575b600080fd5b605e7f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa81565b6040516001600160e01b0319909116815260200160405180910390f3fea164736f6c6343000806000a",
}
var VRFV2PlusClientABI = VRFV2PlusClientMetaData.ABI
diff --git a/core/gethwrappers/generated/vrfv2plus_consumer_example/vrfv2plus_consumer_example.go b/core/gethwrappers/generated/vrfv2plus_consumer_example/vrfv2plus_consumer_example.go
index ce2d4fd13c..694a9a6f41 100644
--- a/core/gethwrappers/generated/vrfv2plus_consumer_example/vrfv2plus_consumer_example.go
+++ b/core/gethwrappers/generated/vrfv2plus_consumer_example/vrfv2plus_consumer_example.go
@@ -31,8 +31,8 @@ var (
)
var VRFV2PlusConsumerExampleMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createSubscriptionAndFundNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"idx\",\"type\":\"uint256\"}],\"name\":\"getRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomWord\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_linkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_recentRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requests\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_subId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinatorApiV1\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"setSubId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"topUpSubscriptionNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
- Bin: "0x60806040523480156200001157600080fd5b506040516200197e3803806200197e8339810160408190526200003491620001cc565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000103565b5050600280546001600160a01b03199081166001600160a01b0394851617909155600580548216958416959095179094555060038054909316911617905562000204565b6001600160a01b0381163314156200015e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001c757600080fd5b919050565b60008060408385031215620001e057600080fd5b620001eb83620001af565b9150620001fb60208401620001af565b90509250929050565b61176a80620002146000396000f3fe6080604052600436106101295760003560e01c806380980043116100a5578063b96dbba711610074578063de367c8e11610059578063de367c8e14610378578063eff27017146103a5578063f2fde38b146103c557600080fd5b8063b96dbba714610350578063cf62c8ab1461035857600080fd5b8063809800431461025e5780638da5cb5b1461027e5780638ea98117146102a9578063a168fa89146102c957600080fd5b806336bfffed116100fc578063706da1ca116100e1578063706da1ca146101e15780637725135b146101f757806379ba50971461024957600080fd5b806336bfffed146101ab5780635d7d53e3146101cb57600080fd5b80631d2b2afd1461012e5780631fe543e31461013857806329e5d831146101585780632fa4e4421461018b575b600080fd5b6101366103e5565b005b34801561014457600080fd5b506101366101533660046113a3565b6104e0565b34801561016457600080fd5b50610178610173366004611447565b610561565b6040519081526020015b60405180910390f35b34801561019757600080fd5b506101366101a63660046114d4565b61069e565b3480156101b757600080fd5b506101366101c63660046112b0565b6107c0565b3480156101d757600080fd5b5061017860045481565b3480156101ed57600080fd5b5061017860065481565b34801561020357600080fd5b506003546102249073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610182565b34801561025557600080fd5b506101366108f8565b34801561026a57600080fd5b50610136610279366004611371565b600655565b34801561028a57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610224565b3480156102b557600080fd5b506101366102c436600461128e565b6109f5565b3480156102d557600080fd5b5061031e6102e4366004611371565b6007602052600090815260409020805460019091015460ff821691610100900473ffffffffffffffffffffffffffffffffffffffff169083565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff909216602084015290820152606001610182565b610136610b00565b34801561036457600080fd5b506101366103733660046114d4565b610b66565b34801561038457600080fd5b506005546102249073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103b157600080fd5b506101366103c0366004611469565b610bad565b3480156103d157600080fd5b506101366103e036600461128e565b610d98565b600654610453576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f742073657400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6005546006546040517fe8509bff000000000000000000000000000000000000000000000000000000008152600481019190915273ffffffffffffffffffffffffffffffffffffffff9091169063e8509bff9034906024015b6000604051808303818588803b1580156104c557600080fd5b505af11580156104d9573d6000803e3d6000fd5b5050505050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610553576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff909116602482015260440161044a565b61055d8282610dac565b5050565b60008281526007602090815260408083208151608081018352815460ff811615158252610100900473ffffffffffffffffffffffffffffffffffffffff1681850152600182015481840152600282018054845181870281018701909552808552869592946060860193909291908301828280156105fd57602002820191906000526020600020905b8154815260200190600101908083116105e9575b5050505050815250509050806040015160001415610677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f7272656374000000000000000000604482015260640161044a565b8060600151838151811061068d5761068d6116f1565b602002602001015191505092915050565b600654610707576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f7420736574000000000000000000000000000000000000000000604482015260640161044a565b60035460025460065460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591015b6040516020818303038152906040526040518463ffffffff1660e01b815260040161076e9392919061156d565b602060405180830381600087803b15801561078857600080fd5b505af115801561079c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055d9190611354565b600654610829576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f742073657400000000000000000000000000000000000000604482015260640161044a565b60005b815181101561055d57600554600654835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c919085908590811061086f5761086f6116f1565b60200260200101516040518363ffffffff1660e01b81526004016108b392919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b1580156108cd57600080fd5b505af11580156108e1573d6000803e3d6000fd5b5050505080806108f090611691565b91505061082c565b60015473ffffffffffffffffffffffffffffffffffffffff163314610979576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161044a565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610a35575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610ab95733610a5a60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161044a565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610b08610e77565b506005546006546040517fe8509bff000000000000000000000000000000000000000000000000000000008152600481019190915273ffffffffffffffffffffffffffffffffffffffff9091169063e8509bff9034906024016104ac565b610b6e610e77565b5060035460025460065460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea0931691859101610741565b60006040518060c0016040528084815260200160065481526020018661ffff1681526020018763ffffffff1681526020018563ffffffff168152602001610c036040518060200160405280861515815250610fbc565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90610c619085906004016115b9565b602060405180830381600087803b158015610c7b57600080fd5b505af1158015610c8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb3919061138a565b604080516080810182526000808252336020808401918252838501868152855184815280830187526060860190815287855260078352959093208451815493517fffffffffffffffffffffff0000000000000000000000000000000000000000009094169015157fffffffffffffffffffffff0000000000000000000000000000000000000000ff161761010073ffffffffffffffffffffffffffffffffffffffff9094169390930292909217825591516001820155925180519495509193849392610d869260028501929101906111f1565b50505060049190915550505050505050565b610da0611078565b610da9816110fb565b50565b6004548214610e17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f7272656374000000000000000000604482015260640161044a565b60008281526007602090815260409091208251610e3c926002909201918401906111f1565b5050600090815260076020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600060065460001415610fb557600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610eee57600080fd5b505af1158015610f02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f26919061138a565b60068190556005546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b158015610f9c57600080fd5b505af1158015610fb0573d6000803e3d6000fd5b505050505b5060065490565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401610ff591511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146110f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161044a565b565b73ffffffffffffffffffffffffffffffffffffffff811633141561117b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161044a565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b82805482825590600052602060002090810192821561122c579160200282015b8281111561122c578251825591602001919060010190611211565b5061123892915061123c565b5090565b5b80821115611238576000815560010161123d565b803573ffffffffffffffffffffffffffffffffffffffff8116811461127557600080fd5b919050565b803563ffffffff8116811461127557600080fd5b6000602082840312156112a057600080fd5b6112a982611251565b9392505050565b600060208083850312156112c357600080fd5b823567ffffffffffffffff8111156112da57600080fd5b8301601f810185136112eb57600080fd5b80356112fe6112f98261166d565b61161e565b80828252848201915084840188868560051b870101111561131e57600080fd5b600094505b838510156113485761133481611251565b835260019490940193918501918501611323565b50979650505050505050565b60006020828403121561136657600080fd5b81516112a98161174f565b60006020828403121561138357600080fd5b5035919050565b60006020828403121561139c57600080fd5b5051919050565b600080604083850312156113b657600080fd5b8235915060208084013567ffffffffffffffff8111156113d557600080fd5b8401601f810186136113e657600080fd5b80356113f46112f98261166d565b80828252848201915084840189868560051b870101111561141457600080fd5b600094505b83851015611437578035835260019490940193918501918501611419565b5080955050505050509250929050565b6000806040838503121561145a57600080fd5b50508035926020909101359150565b600080600080600060a0868803121561148157600080fd5b61148a8661127a565b9450602086013561ffff811681146114a157600080fd5b93506114af6040870161127a565b92506060860135915060808601356114c68161174f565b809150509295509295909350565b6000602082840312156114e657600080fd5b81356bffffffffffffffffffffffff811681146112a957600080fd5b6000815180845260005b818110156115285760208185018101518683018201520161150c565b8181111561153a576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201526060604082015260006115b06060830184611502565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c08084015261161660e0840182611502565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561166557611665611720565b604052919050565b600067ffffffffffffffff82111561168757611687611720565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156116ea577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8015158114610da957600080fdfea164736f6c6343000806000a",
+ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createSubscriptionAndFundNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"idx\",\"type\":\"uint256\"}],\"name\":\"getRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomWord\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"nativePayment\",\"type\":\"bool\"}],\"name\":\"requestRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_linkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_recentRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requests\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_subId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFMigratableCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinatorApiV1\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"setSubId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"topUpSubscriptionNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ Bin: "0x60806040523480156200001157600080fd5b50604051620019c6380380620019c68339810160408190526200003491620001cc565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000103565b5050600280546001600160a01b03199081166001600160a01b0394851617909155600580548216958416959095179094555060038054909316911617905562000204565b6001600160a01b0381163314156200015e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001c757600080fd5b919050565b60008060408385031215620001e057600080fd5b620001eb83620001af565b9150620001fb60208401620001af565b90509250929050565b6117b280620002146000396000f3fe6080604052600436106101445760003560e01c806380980043116100c0578063b96dbba711610074578063de367c8e11610059578063de367c8e146103c0578063eff27017146103ed578063f2fde38b1461040d57600080fd5b8063b96dbba714610398578063cf62c8ab146103a057600080fd5b80638ea98117116100a55780638ea98117146102c45780639eccacf6146102e4578063a168fa891461031157600080fd5b806380980043146102795780638da5cb5b1461029957600080fd5b806336bfffed11610117578063706da1ca116100fc578063706da1ca146101fc5780637725135b1461021257806379ba50971461026457600080fd5b806336bfffed146101c65780635d7d53e3146101e657600080fd5b80631d2b2afd146101495780631fe543e31461015357806329e5d831146101735780632fa4e442146101a6575b600080fd5b61015161042d565b005b34801561015f57600080fd5b5061015161016e3660046113eb565b610528565b34801561017f57600080fd5b5061019361018e36600461148f565b6105a9565b6040519081526020015b60405180910390f35b3480156101b257600080fd5b506101516101c136600461151c565b6106e6565b3480156101d257600080fd5b506101516101e13660046112f8565b610808565b3480156101f257600080fd5b5061019360045481565b34801561020857600080fd5b5061019360065481565b34801561021e57600080fd5b5060035461023f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019d565b34801561027057600080fd5b50610151610940565b34801561028557600080fd5b506101516102943660046113b9565b600655565b3480156102a557600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661023f565b3480156102d057600080fd5b506101516102df3660046112d6565b610a3d565b3480156102f057600080fd5b5060025461023f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561031d57600080fd5b5061036661032c3660046113b9565b6007602052600090815260409020805460019091015460ff821691610100900473ffffffffffffffffffffffffffffffffffffffff169083565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff90921660208401529082015260600161019d565b610151610b48565b3480156103ac57600080fd5b506101516103bb36600461151c565b610bae565b3480156103cc57600080fd5b5060055461023f9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103f957600080fd5b506101516104083660046114b1565b610bf5565b34801561041957600080fd5b506101516104283660046112d6565b610de0565b60065461049b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f742073657400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6005546006546040517fe8509bff000000000000000000000000000000000000000000000000000000008152600481019190915273ffffffffffffffffffffffffffffffffffffffff9091169063e8509bff9034906024015b6000604051808303818588803b15801561050d57600080fd5b505af1158015610521573d6000803e3d6000fd5b5050505050565b60025473ffffffffffffffffffffffffffffffffffffffff16331461059b576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610492565b6105a58282610df4565b5050565b60008281526007602090815260408083208151608081018352815460ff811615158252610100900473ffffffffffffffffffffffffffffffffffffffff16818501526001820154818401526002820180548451818702810187019095528085528695929460608601939092919083018282801561064557602002820191906000526020600020905b815481526020019060010190808311610631575b50505050508152505090508060400151600014156106bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f72726563740000000000000000006044820152606401610492565b806060015183815181106106d5576106d5611739565b602002602001015191505092915050565b60065461074f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f74207365740000000000000000000000000000000000000000006044820152606401610492565b60035460025460065460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591015b6040516020818303038152906040526040518463ffffffff1660e01b81526004016107b6939291906115b5565b602060405180830381600087803b1580156107d057600080fd5b505af11580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a5919061139c565b600654610871576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f7420736574000000000000000000000000000000000000006044820152606401610492565b60005b81518110156105a557600554600654835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c91908590859081106108b7576108b7611739565b60200260200101516040518363ffffffff1660e01b81526004016108fb92919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b15801561091557600080fd5b505af1158015610929573d6000803e3d6000fd5b505050508080610938906116d9565b915050610874565b60015473ffffffffffffffffffffffffffffffffffffffff1633146109c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610492565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610a7d575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610b015733610aa260005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610492565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610b50610ebf565b506005546006546040517fe8509bff000000000000000000000000000000000000000000000000000000008152600481019190915273ffffffffffffffffffffffffffffffffffffffff9091169063e8509bff9034906024016104f4565b610bb6610ebf565b5060035460025460065460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea0931691859101610789565b60006040518060c0016040528084815260200160065481526020018661ffff1681526020018763ffffffff1681526020018563ffffffff168152602001610c4b6040518060200160405280861515815250611004565b90526002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90610ca9908590600401611601565b602060405180830381600087803b158015610cc357600080fd5b505af1158015610cd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfb91906113d2565b604080516080810182526000808252336020808401918252838501868152855184815280830187526060860190815287855260078352959093208451815493517fffffffffffffffffffffff0000000000000000000000000000000000000000009094169015157fffffffffffffffffffffff0000000000000000000000000000000000000000ff161761010073ffffffffffffffffffffffffffffffffffffffff9094169390930292909217825591516001820155925180519495509193849392610dce926002850192910190611239565b50505060049190915550505050505050565b610de86110c0565b610df181611143565b50565b6004548214610e5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f72726563740000000000000000006044820152606401610492565b60008281526007602090815260409091208251610e8492600290920191840190611239565b5050600090815260076020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600060065460001415610ffd57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610f3657600080fd5b505af1158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e91906113d2565b60068190556005546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b505050505b5060065490565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161103d91511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610492565b565b73ffffffffffffffffffffffffffffffffffffffff81163314156111c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610492565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215611274579160200282015b82811115611274578251825591602001919060010190611259565b50611280929150611284565b5090565b5b808211156112805760008155600101611285565b803573ffffffffffffffffffffffffffffffffffffffff811681146112bd57600080fd5b919050565b803563ffffffff811681146112bd57600080fd5b6000602082840312156112e857600080fd5b6112f182611299565b9392505050565b6000602080838503121561130b57600080fd5b823567ffffffffffffffff81111561132257600080fd5b8301601f8101851361133357600080fd5b8035611346611341826116b5565b611666565b80828252848201915084840188868560051b870101111561136657600080fd5b600094505b838510156113905761137c81611299565b83526001949094019391850191850161136b565b50979650505050505050565b6000602082840312156113ae57600080fd5b81516112f181611797565b6000602082840312156113cb57600080fd5b5035919050565b6000602082840312156113e457600080fd5b5051919050565b600080604083850312156113fe57600080fd5b8235915060208084013567ffffffffffffffff81111561141d57600080fd5b8401601f8101861361142e57600080fd5b803561143c611341826116b5565b80828252848201915084840189868560051b870101111561145c57600080fd5b600094505b8385101561147f578035835260019490940193918501918501611461565b5080955050505050509250929050565b600080604083850312156114a257600080fd5b50508035926020909101359150565b600080600080600060a086880312156114c957600080fd5b6114d2866112c2565b9450602086013561ffff811681146114e957600080fd5b93506114f7604087016112c2565b925060608601359150608086013561150e81611797565b809150509295509295909350565b60006020828403121561152e57600080fd5b81356bffffffffffffffffffffffff811681146112f157600080fd5b6000815180845260005b8181101561157057602081850181015186830182015201611554565b81811115611582576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201526060604082015260006115f8606083018461154a565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c08084015261165e60e084018261154a565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156116ad576116ad611768565b604052919050565b600067ffffffffffffffff8211156116cf576116cf611768565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611732577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8015158114610df157600080fdfea164736f6c6343000806000a",
}
var VRFV2PlusConsumerExampleABI = VRFV2PlusConsumerExampleMetaData.ABI
@@ -312,6 +312,28 @@ func (_VRFV2PlusConsumerExample *VRFV2PlusConsumerExampleCallerSession) SSubId()
return _VRFV2PlusConsumerExample.Contract.SSubId(&_VRFV2PlusConsumerExample.CallOpts)
}
+func (_VRFV2PlusConsumerExample *VRFV2PlusConsumerExampleCaller) SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _VRFV2PlusConsumerExample.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 (_VRFV2PlusConsumerExample *VRFV2PlusConsumerExampleSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusConsumerExample.Contract.SVrfCoordinator(&_VRFV2PlusConsumerExample.CallOpts)
+}
+
+func (_VRFV2PlusConsumerExample *VRFV2PlusConsumerExampleCallerSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusConsumerExample.Contract.SVrfCoordinator(&_VRFV2PlusConsumerExample.CallOpts)
+}
+
func (_VRFV2PlusConsumerExample *VRFV2PlusConsumerExampleCaller) SVrfCoordinatorApiV1(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _VRFV2PlusConsumerExample.contract.Call(opts, &out, "s_vrfCoordinatorApiV1")
@@ -783,6 +805,8 @@ type VRFV2PlusConsumerExampleInterface interface {
SSubId(opts *bind.CallOpts) (*big.Int, error)
+ SVrfCoordinator(opts *bind.CallOpts) (common.Address, error)
+
SVrfCoordinatorApiV1(opts *bind.CallOpts) (common.Address, error)
AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error)
diff --git a/core/gethwrappers/generated/vrfv2plus_reverting_example/vrfv2plus_reverting_example.go b/core/gethwrappers/generated/vrfv2plus_reverting_example/vrfv2plus_reverting_example.go
index cbfa569066..413f3e52b2 100644
--- a/core/gethwrappers/generated/vrfv2plus_reverting_example/vrfv2plus_reverting_example.go
+++ b/core/gethwrappers/generated/vrfv2plus_reverting_example/vrfv2plus_reverting_example.go
@@ -31,8 +31,8 @@ var (
)
var VRFV2PlusRevertingExampleMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"minReqConfs\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"}],\"name\":\"requestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_gasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_subId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
- Bin: "0x60806040523480156200001157600080fd5b50604051620011dd380380620011dd8339810160408190526200003491620001cc565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000103565b5050600280546001600160a01b03199081166001600160a01b0394851617909155600580548216958416959095179094555060068054909316911617905562000204565b6001600160a01b0381163314156200015e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001c757600080fd5b919050565b60008060408385031215620001e057600080fd5b620001eb83620001af565b9150620001fb60208401620001af565b90509250929050565b610fc980620002146000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80638da5cb5b1161008c578063e89e106a11610066578063e89e106a146101a4578063f08c5daa146101ad578063f2fde38b146101b6578063f6eaffc8146101c957600080fd5b80638da5cb5b146101565780638ea981171461017e578063cf62c8ab1461019157600080fd5b806336bfffed116100bd57806336bfffed14610132578063706da1ca1461014557806379ba50971461014e57600080fd5b80631fe543e3146100e45780632e75964e146100f95780632fa4e4421461011f575b600080fd5b6100f76100f2366004610c9d565b6101dc565b005b61010c610107366004610c0b565b610262565b6040519081526020015b60405180910390f35b6100f761012d366004610d41565b61035f565b6100f7610140366004610b45565b610481565b61010c60075481565b6100f76105b9565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610116565b6100f761018c366004610b23565b6106b6565b6100f761019f366004610d41565b6107c1565b61010c60045481565b61010c60085481565b6100f76101c4366004610b23565b610938565b61010c6101d7366004610c6b565b61094c565b60025473ffffffffffffffffffffffffffffffffffffffff163314610254576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b61025e8282600080fd5b5050565b6040805160c081018252868152602080820187905261ffff86168284015263ffffffff80861660608401528416608083015282519081018352600080825260a083019190915260055492517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906102fd908490600401610e26565b602060405180830381600087803b15801561031757600080fd5b505af115801561032b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034f9190610c84565b6004819055979650505050505050565b6007546103c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f7420736574000000000000000000000000000000000000000000604482015260640161024b565b60065460055460075460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591015b6040516020818303038152906040526040518463ffffffff1660e01b815260040161042f93929190610dda565b602060405180830381600087803b15801561044957600080fd5b505af115801561045d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025e9190610be9565b6007546104ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f742073657400000000000000000000000000000000000000604482015260640161024b565b60005b815181101561025e57600554600754835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c919085908590811061053057610530610f5e565b60200260200101516040518363ffffffff1660e01b815260040161057492919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b15801561058e57600080fd5b505af11580156105a2573d6000803e3d6000fd5b5050505080806105b190610efe565b9150506104ed565b60015473ffffffffffffffffffffffffffffffffffffffff16331461063a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161024b565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906106f6575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561077a573361071b60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161024b565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6007546103c857600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561083257600080fd5b505af1158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610c84565b60078190556005546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b1580156108e057600080fd5b505af11580156108f4573d6000803e3d6000fd5b5050505060065460055460075460405173ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591610402919060200190815260200190565b61094061096d565b610949816109f0565b50565b6003818154811061095c57600080fd5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161024b565b565b73ffffffffffffffffffffffffffffffffffffffff8116331415610a70576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161024b565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b0a57600080fd5b919050565b803563ffffffff81168114610b0a57600080fd5b600060208284031215610b3557600080fd5b610b3e82610ae6565b9392505050565b60006020808385031215610b5857600080fd5b823567ffffffffffffffff811115610b6f57600080fd5b8301601f81018513610b8057600080fd5b8035610b93610b8e82610eda565b610e8b565b80828252848201915084840188868560051b8701011115610bb357600080fd5b600094505b83851015610bdd57610bc981610ae6565b835260019490940193918501918501610bb8565b50979650505050505050565b600060208284031215610bfb57600080fd5b81518015158114610b3e57600080fd5b600080600080600060a08688031215610c2357600080fd5b8535945060208601359350604086013561ffff81168114610c4357600080fd5b9250610c5160608701610b0f565b9150610c5f60808701610b0f565b90509295509295909350565b600060208284031215610c7d57600080fd5b5035919050565b600060208284031215610c9657600080fd5b5051919050565b60008060408385031215610cb057600080fd5b8235915060208084013567ffffffffffffffff811115610ccf57600080fd5b8401601f81018613610ce057600080fd5b8035610cee610b8e82610eda565b80828252848201915084840189868560051b8701011115610d0e57600080fd5b600094505b83851015610d31578035835260019490940193918501918501610d13565b5080955050505050509250929050565b600060208284031215610d5357600080fd5b81356bffffffffffffffffffffffff81168114610b3e57600080fd5b6000815180845260005b81811015610d9557602081850181015186830182015201610d79565b81811115610da7576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff83166020820152606060408201526000610e1d6060830184610d6f565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c080840152610e8360e0840182610d6f565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610ed257610ed2610f8d565b604052919050565b600067ffffffffffffffff821115610ef457610ef4610f8d565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f57577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a",
+ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"minReqConfs\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"}],\"name\":\"requestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_gasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_subId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFMigratableCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ Bin: "0x60806040523480156200001157600080fd5b506040516200121f3803806200121f8339810160408190526200003491620001cc565b8133806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf8162000103565b5050600280546001600160a01b03199081166001600160a01b0394851617909155600580548216958416959095179094555060068054909316911617905562000204565b6001600160a01b0381163314156200015e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001c757600080fd5b919050565b60008060408385031215620001e057600080fd5b620001eb83620001af565b9150620001fb60208401620001af565b90509250929050565b61100b80620002146000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638ea981171161008c578063e89e106a11610066578063e89e106a146101e6578063f08c5daa146101ef578063f2fde38b146101f8578063f6eaffc81461020b57600080fd5b80638ea98117146101a05780639eccacf6146101b3578063cf62c8ab146101d357600080fd5b806336bfffed116100c857806336bfffed1461013d578063706da1ca1461015057806379ba5097146101595780638da5cb5b1461016157600080fd5b80631fe543e3146100ef5780632e75964e146101045780632fa4e4421461012a575b600080fd5b6101026100fd366004610cdf565b61021e565b005b610117610112366004610c4d565b6102a4565b6040519081526020015b60405180910390f35b610102610138366004610d83565b6103a1565b61010261014b366004610b87565b6104c3565b61011760075481565b6101026105fb565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610121565b6101026101ae366004610b65565b6106f8565b60025461017b9073ffffffffffffffffffffffffffffffffffffffff1681565b6101026101e1366004610d83565b610803565b61011760045481565b61011760085481565b610102610206366004610b65565b61097a565b610117610219366004610cad565b61098e565b60025473ffffffffffffffffffffffffffffffffffffffff163314610296576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6102a08282600080fd5b5050565b6040805160c081018252868152602080820187905261ffff86168284015263ffffffff80861660608401528416608083015282519081018352600080825260a083019190915260055492517f9b1c385e000000000000000000000000000000000000000000000000000000008152909273ffffffffffffffffffffffffffffffffffffffff1690639b1c385e9061033f908490600401610e68565b602060405180830381600087803b15801561035957600080fd5b505af115801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610cc6565b6004819055979650505050505050565b60075461040a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f7420736574000000000000000000000000000000000000000000604482015260640161028d565b60065460055460075460408051602081019290925273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591015b6040516020818303038152906040526040518463ffffffff1660e01b815260040161047193929190610e1c565b602060405180830381600087803b15801561048b57600080fd5b505af115801561049f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a09190610c2b565b60075461052c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f742073657400000000000000000000000000000000000000604482015260640161028d565b60005b81518110156102a057600554600754835173ffffffffffffffffffffffffffffffffffffffff9092169163bec4c08c919085908590811061057257610572610fa0565b60200260200101516040518363ffffffff1660e01b81526004016105b692919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b1580156105d057600080fd5b505af11580156105e4573d6000803e3d6000fd5b5050505080806105f390610f40565b91505061052f565b60015473ffffffffffffffffffffffffffffffffffffffff16331461067c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161028d565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610738575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156107bc573361075d60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161028d565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60075461040a57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561087457600080fd5b505af1158015610888573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ac9190610cc6565b60078190556005546040517fbec4c08c000000000000000000000000000000000000000000000000000000008152600481019290925230602483015273ffffffffffffffffffffffffffffffffffffffff169063bec4c08c90604401600060405180830381600087803b15801561092257600080fd5b505af1158015610936573d6000803e3d6000fd5b5050505060065460055460075460405173ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591610444919060200190815260200190565b6109826109af565b61098b81610a32565b50565b6003818154811061099e57600080fd5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161028d565b565b73ffffffffffffffffffffffffffffffffffffffff8116331415610ab2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161028d565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b4c57600080fd5b919050565b803563ffffffff81168114610b4c57600080fd5b600060208284031215610b7757600080fd5b610b8082610b28565b9392505050565b60006020808385031215610b9a57600080fd5b823567ffffffffffffffff811115610bb157600080fd5b8301601f81018513610bc257600080fd5b8035610bd5610bd082610f1c565b610ecd565b80828252848201915084840188868560051b8701011115610bf557600080fd5b600094505b83851015610c1f57610c0b81610b28565b835260019490940193918501918501610bfa565b50979650505050505050565b600060208284031215610c3d57600080fd5b81518015158114610b8057600080fd5b600080600080600060a08688031215610c6557600080fd5b8535945060208601359350604086013561ffff81168114610c8557600080fd5b9250610c9360608701610b51565b9150610ca160808701610b51565b90509295509295909350565b600060208284031215610cbf57600080fd5b5035919050565b600060208284031215610cd857600080fd5b5051919050565b60008060408385031215610cf257600080fd5b8235915060208084013567ffffffffffffffff811115610d1157600080fd5b8401601f81018613610d2257600080fd5b8035610d30610bd082610f1c565b80828252848201915084840189868560051b8701011115610d5057600080fd5b600094505b83851015610d73578035835260019490940193918501918501610d55565b5080955050505050509250929050565b600060208284031215610d9557600080fd5b81356bffffffffffffffffffffffff81168114610b8057600080fd5b6000815180845260005b81811015610dd757602081850181015186830182015201610dbb565b81811115610de9576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff83166020820152606060408201526000610e5f6060830184610db1565b95945050505050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c080840152610ec560e0840182610db1565b949350505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610f1457610f14610fcf565b604052919050565b600067ffffffffffffffff821115610f3657610f36610fcf565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f99577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a",
}
var VRFV2PlusRevertingExampleABI = VRFV2PlusRevertingExampleMetaData.ABI
@@ -281,6 +281,28 @@ func (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExampleCallerSession) SSubId
return _VRFV2PlusRevertingExample.Contract.SSubId(&_VRFV2PlusRevertingExample.CallOpts)
}
+func (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExampleCaller) SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _VRFV2PlusRevertingExample.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 (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExampleSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusRevertingExample.Contract.SVrfCoordinator(&_VRFV2PlusRevertingExample.CallOpts)
+}
+
+func (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExampleCallerSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusRevertingExample.Contract.SVrfCoordinator(&_VRFV2PlusRevertingExample.CallOpts)
+}
+
func (_VRFV2PlusRevertingExample *VRFV2PlusRevertingExampleTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
return _VRFV2PlusRevertingExample.contract.Transact(opts, "acceptOwnership")
}
@@ -684,6 +706,8 @@ type VRFV2PlusRevertingExampleInterface interface {
SSubId(opts *bind.CallOpts) (*big.Int, error)
+ SVrfCoordinator(opts *bind.CallOpts) (common.Address, error)
+
AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error)
CreateSubscriptionAndFund(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error)
diff --git a/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go b/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go
index 6d7e574f4b..26f471725c 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\":\"_linkEthFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_coordinator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"WrapperFulfillmentFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"COORDINATOR\",\"outputs\":[{\"internalType\":\"contractExtendedVRFCoordinatorV2PlusInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SUBSCRIPTION_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"wrapperPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_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\"}],\"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\":\"uint256\",\"name\":\"requestGasPrice\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_configured\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_disabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fulfillmentTxSizeBytes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_link\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_linkEthFeed\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_wrapperPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_maxNumWords\",\"type\":\"uint8\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"size\",\"type\":\"uint32\"}],\"name\":\"setFulfillmentTxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"name\":\"setLINK\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"linkEthFeed\",\"type\":\"address\"}],\"name\":\"setLinkEthFeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
- Bin: "0x60c06040526004805463ffffffff60a01b1916609160a21b1790553480156200002757600080fd5b50604051620030af380380620030af8339810160408190526200004a9162000317565b803380600081620000a25760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000d557620000d5816200024e565b5050600280546001600160a01b0319166001600160a01b03938416179055508316156200011857600380546001600160a01b0319166001600160a01b0385161790555b6001600160a01b038216156200014457600480546001600160a01b0319166001600160a01b0384161790555b806001600160a01b03166080816001600160a01b031660601b815250506000816001600160a01b031663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156200019f57600080fd5b505af1158015620001b4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001da919062000361565b60a0819052604051632fb1302360e21b8152600481018290523060248201529091506001600160a01b0383169063bec4c08c90604401600060405180830381600087803b1580156200022b57600080fd5b505af115801562000240573d6000803e3d6000fd5b50505050505050506200037b565b6001600160a01b038116331415620002a95760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000099565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200031257600080fd5b919050565b6000806000606084860312156200032d57600080fd5b6200033884620002fa565b92506200034860208501620002fa565b91506200035860408501620002fa565b90509250925092565b6000602082840312156200037457600080fd5b5051919050565b60805160601c60a051612cda620003d5600039600081816101e401528181610ceb01526115ac0152600081816102ee01528181610db5015281816116330152818161193b01528181611a1c0152611ab70152612cda6000f3fe6080604052600436106101cd5760003560e01c80638da5cb5b116100f7578063bf17e55911610095578063da4f5e6d11610064578063da4f5e6d146106c7578063f2fde38b146106f4578063f3fef3a314610714578063fc2a88c31461073457600080fd5b8063bf17e55914610595578063c15ce4d7146105b5578063c3f909d4146105d5578063cdd8d8851461067d57600080fd5b8063a02e0616116100d1578063a02e061614610521578063a3907d7114610541578063a4c0ed3614610556578063a608a1e11461057657600080fd5b80638da5cb5b146104b65780638ea98117146104e1578063981837d51461050157600080fd5b80634306d3541161016f57806361d386661161013e57806361d386661461044157806362a504fc1461046e57806379ba5097146104815780637fb5d19d1461049657600080fd5b80634306d3541461033557806348baa1c5146103555780634b160935146103f757806357a8070a1461041757600080fd5b80631fe543e3116101ab5780631fe543e3146102875780632f2770db146102a75780633255c456146102bc5780633b2bcbf1146102dc57600080fd5b8063030932bb146101d257806307b18bde14610219578063181f5a771461023b575b600080fd5b3480156101de57600080fd5b506102067f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561022557600080fd5b50610239610234366004612602565b61074a565b005b34801561024757600080fd5b50604080518082018252601281527f56524656325772617070657220312e302e300000000000000000000000000000602082015290516102109190612a70565b34801561029357600080fd5b506102396102a2366004612766565b610826565b3480156102b357600080fd5b506102396108a7565b3480156102c857600080fd5b506102066102d7366004612907565b6108dd565b3480156102e857600080fd5b506103107f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610210565b34801561034157600080fd5b5061020661035036600461289f565b6109d5565b34801561036157600080fd5b506103c061037036600461274d565b600b602052600090815260409020805460019091015473ffffffffffffffffffffffffffffffffffffffff82169174010000000000000000000000000000000000000000900463ffffffff169083565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845263ffffffff909216602084015290820152606001610210565b34801561040357600080fd5b5061020661041236600461289f565b610adc565b34801561042357600080fd5b506006546104319060ff1681565b6040519015158152602001610210565b34801561044d57600080fd5b506004546103109073ffffffffffffffffffffffffffffffffffffffff1681565b61020661047c3660046128bc565b610bd3565b34801561048d57600080fd5b50610239610ee5565b3480156104a257600080fd5b506102066104b1366004612907565b610fe2565b3480156104c257600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610310565b3480156104ed57600080fd5b506102396104fc3660046125e7565b6110e8565b34801561050d57600080fd5b5061023961051c3660046125e7565b6111f3565b34801561052d57600080fd5b5061023961053c3660046125e7565b611242565b34801561054d57600080fd5b506102396112e1565b34801561056257600080fd5b5061023961057136600461262c565b611313565b34801561058257600080fd5b5060065461043190610100900460ff1681565b3480156105a157600080fd5b506102396105b036600461289f565b611793565b3480156105c157600080fd5b506102396105d036600461295f565b6117ea565b3480156105e157600080fd5b50600754600854600954600a546040805194855263ffffffff808516602087015264010000000085048116918601919091526c01000000000000000000000000840481166060860152700100000000000000000000000000000000840416608085015260ff74010000000000000000000000000000000000000000909304831660a085015260c08401919091521660e082015261010001610210565b34801561068957600080fd5b506004546106b29074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610210565b3480156106d357600080fd5b506003546103109073ffffffffffffffffffffffffffffffffffffffff1681565b34801561070057600080fd5b5061023961070f3660046125e7565b611bc6565b34801561072057600080fd5b5061023961072f366004612602565b611bda565b34801561074057600080fd5b5061020660055481565b610752611cc4565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146107ac576040519150601f19603f3d011682016040523d82523d6000602084013e6107b1565b606091505b5050905080610821576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6661696c656420746f207769746864726177206e61746976650000000000000060448201526064015b60405180910390fd5b505050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610899576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610818565b6108a38282611d47565b5050565b6108af611cc4565b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b60065460009060ff1661094c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610818565b600654610100900460ff16156109be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610818565b6109ce8363ffffffff1683611f33565b9392505050565b60065460009060ff16610a44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610818565b600654610100900460ff1615610ab6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610818565b6000610ac0612044565b9050610ad38363ffffffff163a83612193565b9150505b919050565b60065460009060ff16610b4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610818565b600654610100900460ff1615610bbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610818565b610bcd8263ffffffff163a611f33565b92915050565b600080610bdf856122c0565b90506000610bf38663ffffffff163a611f33565b905080341015610c5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610818565b600a5460ff1663ffffffff85161115610cd4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610818565b60006040518060c0016040528060095481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018761ffff1681526020016008600c9054906101000a900463ffffffff16858a610d389190612b46565b610d429190612b46565b63ffffffff1681526020018663ffffffff168152602001610d736040518060200160405280600115158152506122d8565b90526040517f9b1c385e00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690639b1c385e90610dea908490600401612a83565b602060405180830381600087803b158015610e0457600080fd5b505af1158015610e18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3c91906126d5565b6040805160608101825233815263ffffffff808b1660208084019182523a8486019081526000878152600b90925294902092518354915190921674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090911673ffffffffffffffffffffffffffffffffffffffff9290921691909117178155905160019091015593505050509392505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610f66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610818565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60065460009060ff16611051576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610818565b600654610100900460ff16156110c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610818565b60006110cd612044565b90506110e08463ffffffff168483612193565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590611128575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156111ac573361114d60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610818565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6111fb611cc4565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61124a611cc4565b60035473ffffffffffffffffffffffffffffffffffffffff161561129a576040517f2d118a6e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6112e9611cc4565b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055565b60065460ff1661137f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610818565b600654610100900460ff16156113f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610818565b60035473ffffffffffffffffffffffffffffffffffffffff163314611472576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6f6e6c792063616c6c61626c652066726f6d204c494e4b0000000000000000006044820152606401610818565b60008080611482848601866128bc565b9250925092506000611493846122c0565b9050600061149f612044565b905060006114b48663ffffffff163a84612193565b905080891015611520576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610818565b600a5460ff1663ffffffff85161115611595576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610818565b60006040518060c0016040528060095481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018761ffff1681526020016008600c9054906101000a900463ffffffff16868a6115f99190612b46565b6116039190612b46565b63ffffffff1681526020018663ffffffff16815260200160405180602001604052806000815250815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639b1c385e836040518263ffffffff1660e01b815260040161168a9190612a83565b602060405180830381600087803b1580156116a457600080fd5b505af11580156116b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116dc91906126d5565b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff9e8f16815263ffffffff9a8b1660208083019182523a8385019081526000868152600b909252939020915182549151909c1674010000000000000000000000000000000000000000027fffffffffffffffff0000000000000000000000000000000000000000000000009091169b909f169a909a179d909d1789559b5160019098019790975550505060059790975550505050505050565b61179b611cc4565b6004805463ffffffff90921674010000000000000000000000000000000000000000027fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6117f2611cc4565b6008805460ff80861674010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff63ffffffff898116700100000000000000000000000000000000027fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff918c166c0100000000000000000000000002919091167fffffffffffffffffffffffff0000000000000000ffffffffffffffffffffffff909516949094179390931792909216919091179091556009839055600a80549183167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00928316179055600680549091166001179055604080517f088070f5000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163088070f5916004828101926080929190829003018186803b15801561198157600080fd5b505afa158015611995573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b991906126ee565b50600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff929092169190911790555050604080517f043bd6ae00000000000000000000000000000000000000000000000000000000815290517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169163043bd6ae916004808301926020929190829003018186803b158015611a7757600080fd5b505afa158015611a8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aaf91906126d5565b6007819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636b6feccc6040518163ffffffff1660e01b8152600401604080518083038186803b158015611b1a57600080fd5b505afa158015611b2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b529190612925565b600880547fffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffff166801000000000000000063ffffffff938416027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff161764010000000093909216929092021790555050505050565b611bce611cc4565b611bd781612394565b50565b611be2611cc4565b6003546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b158015611c5657600080fd5b505af1158015611c6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8e91906126b3565b6108a3576040517f7c07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff163314611d45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610818565b565b6000828152600b602081815260408084208151606081018352815473ffffffffffffffffffffffffffffffffffffffff808216835263ffffffff740100000000000000000000000000000000000000008304168387015260018401805495840195909552898852959094527fffffffffffffffff000000000000000000000000000000000000000000000000909316905592909255815116611e45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610818565b600080631fe543e360e01b8585604051602401611e63929190612ae0565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000611edd846020015163ffffffff1685600001518461248a565b905080611f2b57835160405173ffffffffffffffffffffffffffffffffffffffff9091169087907fc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b458902290600090a35b505050505050565b6004546000908190611f629074010000000000000000000000000000000000000000900463ffffffff166124d6565b60085463ffffffff7001000000000000000000000000000000008204811691611f9d916c010000000000000000000000009091041687612b2e565b611fa79190612b2e565b611fb19085612bca565b611fbb9190612b2e565b6008549091508190600090606490611fee9074010000000000000000000000000000000000000000900460ff1682612b6e565b611ffb9060ff1684612bca565b6120059190612b93565b60085490915060009061202f9068010000000000000000900463ffffffff1664e8d4a51000612bca565b6120399083612b2e565b979650505050505050565b60085460048054604080517ffeaf968c000000000000000000000000000000000000000000000000000000008152905160009463ffffffff161515938593849373ffffffffffffffffffffffffffffffffffffffff9091169263feaf968c928281019260a0929190829003018186803b1580156120c057600080fd5b505afa1580156120d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f891906129c1565b50945090925084915050801561211e57506121138242612c07565b60085463ffffffff16105b1561212857506007545b60008112156109ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964204c494e4b20776569207072696365000000000000000000006044820152606401610818565b60045460009081906121c29074010000000000000000000000000000000000000000900463ffffffff166124d6565b60085463ffffffff70010000000000000000000000000000000082048116916121fd916c010000000000000000000000009091041688612b2e565b6122079190612b2e565b6122119086612bca565b61221b9190612b2e565b905060008361223283670de0b6b3a7640000612bca565b61223c9190612b93565b60085490915060009060649061226d9074010000000000000000000000000000000000000000900460ff1682612b6e565b61227a9060ff1684612bca565b6122849190612b93565b6008549091506000906122aa90640100000000900463ffffffff1664e8d4a51000612bca565b6122b49083612b2e565b98975050505050505050565b60006122cd603f83612ba7565b610bcd906001612b46565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161231191511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b73ffffffffffffffffffffffffffffffffffffffff8116331415612414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610818565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60005a61138881101561249c57600080fd5b6113888103905084604082048203116124b457600080fd5b50823b6124c057600080fd5b60008083516020850160008789f1949350505050565b60004661a4b18114806124eb575062066eed81145b1561258f576000606c73ffffffffffffffffffffffffffffffffffffffff166341b247a86040518163ffffffff1660e01b815260040160c06040518083038186803b15801561253957600080fd5b505afa15801561254d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125719190612855565b5050505091505083608c6125859190612b2e565b6110e09082612bca565b50600092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610ad757600080fd5b803560ff81168114610ad757600080fd5b805169ffffffffffffffffffff81168114610ad757600080fd5b6000602082840312156125f957600080fd5b6109ce82612598565b6000806040838503121561261557600080fd5b61261e83612598565b946020939093013593505050565b6000806000806060858703121561264257600080fd5b61264b85612598565b935060208501359250604085013567ffffffffffffffff8082111561266f57600080fd5b818701915087601f83011261268357600080fd5b81358181111561269257600080fd5b8860208285010111156126a457600080fd5b95989497505060200194505050565b6000602082840312156126c557600080fd5b815180151581146109ce57600080fd5b6000602082840312156126e757600080fd5b5051919050565b6000806000806080858703121561270457600080fd5b845161270f81612cab565b602086015190945061272081612cbb565b604086015190935061273181612cbb565b606086015190925061274281612cbb565b939692955090935050565b60006020828403121561275f57600080fd5b5035919050565b6000806040838503121561277957600080fd5b8235915060208084013567ffffffffffffffff8082111561279957600080fd5b818601915086601f8301126127ad57600080fd5b8135818111156127bf576127bf612c7c565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561280257612802612c7c565b604052828152858101935084860182860187018b101561282157600080fd5b600095505b83861015612844578035855260019590950194938601938601612826565b508096505050505050509250929050565b60008060008060008060c0878903121561286e57600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b6000602082840312156128b157600080fd5b81356109ce81612cbb565b6000806000606084860312156128d157600080fd5b83356128dc81612cbb565b925060208401356128ec81612cab565b915060408401356128fc81612cbb565b809150509250925092565b6000806040838503121561291a57600080fd5b823561261e81612cbb565b6000806040838503121561293857600080fd5b825161294381612cbb565b602084015190925061295481612cbb565b809150509250929050565b600080600080600060a0868803121561297757600080fd5b853561298281612cbb565b9450602086013561299281612cbb565b93506129a0604087016125bc565b9250606086013591506129b5608087016125bc565b90509295509295909350565b600080600080600060a086880312156129d957600080fd5b6129e2866125cd565b94506020860151935060408601519250606086015191506129b5608087016125cd565b6000815180845260005b81811015612a2b57602081850181015186830182015201612a0f565b81811115612a3d576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006109ce6020830184612a05565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c0808401526110e060e0840182612a05565b6000604082018483526020604081850152818551808452606086019150828701935060005b81811015612b2157845183529383019391830191600101612b05565b5090979650505050505050565b60008219821115612b4157612b41612c1e565b500190565b600063ffffffff808316818516808303821115612b6557612b65612c1e565b01949350505050565b600060ff821660ff84168060ff03821115612b8b57612b8b612c1e565b019392505050565b600082612ba257612ba2612c4d565b500490565b600063ffffffff80841680612bbe57612bbe612c4d565b92169190910492915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612c0257612c02612c1e565b500290565b600082821015612c1957612c19612c1e565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61ffff81168114611bd757600080fd5b63ffffffff81168114611bd757600080fdfea164736f6c6343000806000a",
+ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_linkEthFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_coordinator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"WrapperFulfillmentFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"COORDINATOR\",\"outputs\":[{\"internalType\":\"contractExtendedVRFCoordinatorV2PlusInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SUBSCRIPTION_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"wrapperPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_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\"}],\"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\":\"uint256\",\"name\":\"requestGasPrice\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_configured\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_disabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fulfillmentTxSizeBytes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_link\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_linkEthFeed\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFMigratableCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"_wrapperPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_maxNumWords\",\"type\":\"uint8\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"size\",\"type\":\"uint32\"}],\"name\":\"setFulfillmentTxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"name\":\"setLINK\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"linkEthFeed\",\"type\":\"address\"}],\"name\":\"setLinkEthFeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ Bin: "0x60c06040526004805463ffffffff60a01b1916609160a21b1790553480156200002757600080fd5b50604051620030e7380380620030e78339810160408190526200004a9162000317565b803380600081620000a25760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000d557620000d5816200024e565b5050600280546001600160a01b0319166001600160a01b03938416179055508316156200011857600380546001600160a01b0319166001600160a01b0385161790555b6001600160a01b038216156200014457600480546001600160a01b0319166001600160a01b0384161790555b806001600160a01b03166080816001600160a01b031660601b815250506000816001600160a01b031663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156200019f57600080fd5b505af1158015620001b4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001da919062000361565b60a0819052604051632fb1302360e21b8152600481018290523060248201529091506001600160a01b0383169063bec4c08c90604401600060405180830381600087803b1580156200022b57600080fd5b505af115801562000240573d6000803e3d6000fd5b50505050505050506200037b565b6001600160a01b038116331415620002a95760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000099565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200031257600080fd5b919050565b6000806000606084860312156200032d57600080fd5b6200033884620002fa565b92506200034860208501620002fa565b91506200035860408501620002fa565b90509250925092565b6000602082840312156200037457600080fd5b5051919050565b60805160601c60a051612d12620003d5600039600081816101ef01528181610d2301526115e40152600081816102f901528181610ded0152818161166b0152818161197301528181611a540152611aef0152612d126000f3fe6080604052600436106101d85760003560e01c80638da5cb5b11610102578063bf17e55911610095578063da4f5e6d11610064578063da4f5e6d146106ff578063f2fde38b1461072c578063f3fef3a31461074c578063fc2a88c31461076c57600080fd5b8063bf17e559146105cd578063c15ce4d7146105ed578063c3f909d41461060d578063cdd8d885146106b557600080fd5b8063a02e0616116100d1578063a02e061614610559578063a3907d7114610579578063a4c0ed361461058e578063a608a1e1146105ae57600080fd5b80638da5cb5b146104c15780638ea98117146104ec578063981837d51461050c5780639eccacf61461052c57600080fd5b80634306d3541161017a57806361d386661161014957806361d386661461044c57806362a504fc1461047957806379ba50971461048c5780637fb5d19d146104a157600080fd5b80634306d3541461034057806348baa1c5146103605780634b1609351461040257806357a8070a1461042257600080fd5b80631fe543e3116101b65780631fe543e3146102925780632f2770db146102b25780633255c456146102c75780633b2bcbf1146102e757600080fd5b8063030932bb146101dd57806307b18bde14610224578063181f5a7714610246575b600080fd5b3480156101e957600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023057600080fd5b5061024461023f36600461263a565b610782565b005b34801561025257600080fd5b50604080518082018252601281527f56524656325772617070657220312e302e3000000000000000000000000000006020820152905161021b9190612aa8565b34801561029e57600080fd5b506102446102ad36600461279e565b61085e565b3480156102be57600080fd5b506102446108df565b3480156102d357600080fd5b506102116102e236600461293f565b610915565b3480156102f357600080fd5b5061031b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161021b565b34801561034c57600080fd5b5061021161035b3660046128d7565b610a0d565b34801561036c57600080fd5b506103cb61037b366004612785565b600b602052600090815260409020805460019091015473ffffffffffffffffffffffffffffffffffffffff82169174010000000000000000000000000000000000000000900463ffffffff169083565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845263ffffffff90921660208401529082015260600161021b565b34801561040e57600080fd5b5061021161041d3660046128d7565b610b14565b34801561042e57600080fd5b5060065461043c9060ff1681565b604051901515815260200161021b565b34801561045857600080fd5b5060045461031b9073ffffffffffffffffffffffffffffffffffffffff1681565b6102116104873660046128f4565b610c0b565b34801561049857600080fd5b50610244610f1d565b3480156104ad57600080fd5b506102116104bc36600461293f565b61101a565b3480156104cd57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661031b565b3480156104f857600080fd5b5061024461050736600461261f565b611120565b34801561051857600080fd5b5061024461052736600461261f565b61122b565b34801561053857600080fd5b5060025461031b9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561056557600080fd5b5061024461057436600461261f565b61127a565b34801561058557600080fd5b50610244611319565b34801561059a57600080fd5b506102446105a9366004612664565b61134b565b3480156105ba57600080fd5b5060065461043c90610100900460ff1681565b3480156105d957600080fd5b506102446105e83660046128d7565b6117cb565b3480156105f957600080fd5b50610244610608366004612997565b611822565b34801561061957600080fd5b50600754600854600954600a546040805194855263ffffffff808516602087015264010000000085048116918601919091526c01000000000000000000000000840481166060860152700100000000000000000000000000000000840416608085015260ff74010000000000000000000000000000000000000000909304831660a085015260c08401919091521660e08201526101000161021b565b3480156106c157600080fd5b506004546106ea9074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff909116815260200161021b565b34801561070b57600080fd5b5060035461031b9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561073857600080fd5b5061024461074736600461261f565b611bfe565b34801561075857600080fd5b5061024461076736600461263a565b611c12565b34801561077857600080fd5b5061021160055481565b61078a611cfc565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146107e4576040519150601f19603f3d011682016040523d82523d6000602084013e6107e9565b606091505b5050905080610859576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6661696c656420746f207769746864726177206e61746976650000000000000060448201526064015b60405180910390fd5b505050565b60025473ffffffffffffffffffffffffffffffffffffffff1633146108d1576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610850565b6108db8282611d7f565b5050565b6108e7611cfc565b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b60065460009060ff16610984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610850565b600654610100900460ff16156109f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610850565b610a068363ffffffff1683611f6b565b9392505050565b60065460009060ff16610a7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610850565b600654610100900460ff1615610aee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610850565b6000610af861207c565b9050610b0b8363ffffffff163a836121cb565b9150505b919050565b60065460009060ff16610b83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610850565b600654610100900460ff1615610bf5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610850565b610c058263ffffffff163a611f6b565b92915050565b600080610c17856122f8565b90506000610c2b8663ffffffff163a611f6b565b905080341015610c97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610850565b600a5460ff1663ffffffff85161115610d0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610850565b60006040518060c0016040528060095481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018761ffff1681526020016008600c9054906101000a900463ffffffff16858a610d709190612b7e565b610d7a9190612b7e565b63ffffffff1681526020018663ffffffff168152602001610dab604051806020016040528060011515815250612310565b90526040517f9b1c385e00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690639b1c385e90610e22908490600401612abb565b602060405180830381600087803b158015610e3c57600080fd5b505af1158015610e50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e74919061270d565b6040805160608101825233815263ffffffff808b1660208084019182523a8486019081526000878152600b90925294902092518354915190921674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090911673ffffffffffffffffffffffffffffffffffffffff9290921691909117178155905160019091015593505050509392505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610f9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610850565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60065460009060ff16611089576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610850565b600654610100900460ff16156110fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610850565b600061110561207c565b90506111188463ffffffff1684836121cb565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590611160575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156111e4573361118560005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610850565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611233611cfc565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611282611cfc565b60035473ffffffffffffffffffffffffffffffffffffffff16156112d2576040517f2d118a6e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611321611cfc565b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055565b60065460ff166113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610850565b600654610100900460ff1615611429576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610850565b60035473ffffffffffffffffffffffffffffffffffffffff1633146114aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6f6e6c792063616c6c61626c652066726f6d204c494e4b0000000000000000006044820152606401610850565b600080806114ba848601866128f4565b92509250925060006114cb846122f8565b905060006114d761207c565b905060006114ec8663ffffffff163a846121cb565b905080891015611558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610850565b600a5460ff1663ffffffff851611156115cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610850565b60006040518060c0016040528060095481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018761ffff1681526020016008600c9054906101000a900463ffffffff16868a6116319190612b7e565b61163b9190612b7e565b63ffffffff1681526020018663ffffffff16815260200160405180602001604052806000815250815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639b1c385e836040518263ffffffff1660e01b81526004016116c29190612abb565b602060405180830381600087803b1580156116dc57600080fd5b505af11580156116f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611714919061270d565b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff9e8f16815263ffffffff9a8b1660208083019182523a8385019081526000868152600b909252939020915182549151909c1674010000000000000000000000000000000000000000027fffffffffffffffff0000000000000000000000000000000000000000000000009091169b909f169a909a179d909d1789559b5160019098019790975550505060059790975550505050505050565b6117d3611cfc565b6004805463ffffffff90921674010000000000000000000000000000000000000000027fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b61182a611cfc565b6008805460ff80861674010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff63ffffffff898116700100000000000000000000000000000000027fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff918c166c0100000000000000000000000002919091167fffffffffffffffffffffffff0000000000000000ffffffffffffffffffffffff909516949094179390931792909216919091179091556009839055600a80549183167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00928316179055600680549091166001179055604080517f088070f5000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163088070f5916004828101926080929190829003018186803b1580156119b957600080fd5b505afa1580156119cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f19190612726565b50600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff929092169190911790555050604080517f043bd6ae00000000000000000000000000000000000000000000000000000000815290517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169163043bd6ae916004808301926020929190829003018186803b158015611aaf57600080fd5b505afa158015611ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ae7919061270d565b6007819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636b6feccc6040518163ffffffff1660e01b8152600401604080518083038186803b158015611b5257600080fd5b505afa158015611b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8a919061295d565b600880547fffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffff166801000000000000000063ffffffff938416027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff161764010000000093909216929092021790555050505050565b611c06611cfc565b611c0f816123cc565b50565b611c1a611cfc565b6003546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b158015611c8e57600080fd5b505af1158015611ca2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc691906126eb565b6108db576040517f7c07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff163314611d7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610850565b565b6000828152600b602081815260408084208151606081018352815473ffffffffffffffffffffffffffffffffffffffff808216835263ffffffff740100000000000000000000000000000000000000008304168387015260018401805495840195909552898852959094527fffffffffffffffff000000000000000000000000000000000000000000000000909316905592909255815116611e7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610850565b600080631fe543e360e01b8585604051602401611e9b929190612b18565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000611f15846020015163ffffffff168560000151846124c2565b905080611f6357835160405173ffffffffffffffffffffffffffffffffffffffff9091169087907fc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b458902290600090a35b505050505050565b6004546000908190611f9a9074010000000000000000000000000000000000000000900463ffffffff1661250e565b60085463ffffffff7001000000000000000000000000000000008204811691611fd5916c010000000000000000000000009091041687612b66565b611fdf9190612b66565b611fe99085612c02565b611ff39190612b66565b60085490915081906000906064906120269074010000000000000000000000000000000000000000900460ff1682612ba6565b6120339060ff1684612c02565b61203d9190612bcb565b6008549091506000906120679068010000000000000000900463ffffffff1664e8d4a51000612c02565b6120719083612b66565b979650505050505050565b60085460048054604080517ffeaf968c000000000000000000000000000000000000000000000000000000008152905160009463ffffffff161515938593849373ffffffffffffffffffffffffffffffffffffffff9091169263feaf968c928281019260a0929190829003018186803b1580156120f857600080fd5b505afa15801561210c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213091906129f9565b509450909250849150508015612156575061214b8242612c3f565b60085463ffffffff16105b1561216057506007545b6000811215610a06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964204c494e4b20776569207072696365000000000000000000006044820152606401610850565b60045460009081906121fa9074010000000000000000000000000000000000000000900463ffffffff1661250e565b60085463ffffffff7001000000000000000000000000000000008204811691612235916c010000000000000000000000009091041688612b66565b61223f9190612b66565b6122499086612c02565b6122539190612b66565b905060008361226a83670de0b6b3a7640000612c02565b6122749190612bcb565b6008549091506000906064906122a59074010000000000000000000000000000000000000000900460ff1682612ba6565b6122b29060ff1684612c02565b6122bc9190612bcb565b6008549091506000906122e290640100000000900463ffffffff1664e8d4a51000612c02565b6122ec9083612b66565b98975050505050505050565b6000612305603f83612bdf565b610c05906001612b7e565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161234991511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b73ffffffffffffffffffffffffffffffffffffffff811633141561244c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610850565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60005a6113888110156124d457600080fd5b6113888103905084604082048203116124ec57600080fd5b50823b6124f857600080fd5b60008083516020850160008789f1949350505050565b60004661a4b1811480612523575062066eed81145b156125c7576000606c73ffffffffffffffffffffffffffffffffffffffff166341b247a86040518163ffffffff1660e01b815260040160c06040518083038186803b15801561257157600080fd5b505afa158015612585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125a9919061288d565b5050505091505083608c6125bd9190612b66565b6111189082612c02565b50600092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b0f57600080fd5b803560ff81168114610b0f57600080fd5b805169ffffffffffffffffffff81168114610b0f57600080fd5b60006020828403121561263157600080fd5b610a06826125d0565b6000806040838503121561264d57600080fd5b612656836125d0565b946020939093013593505050565b6000806000806060858703121561267a57600080fd5b612683856125d0565b935060208501359250604085013567ffffffffffffffff808211156126a757600080fd5b818701915087601f8301126126bb57600080fd5b8135818111156126ca57600080fd5b8860208285010111156126dc57600080fd5b95989497505060200194505050565b6000602082840312156126fd57600080fd5b81518015158114610a0657600080fd5b60006020828403121561271f57600080fd5b5051919050565b6000806000806080858703121561273c57600080fd5b845161274781612ce3565b602086015190945061275881612cf3565b604086015190935061276981612cf3565b606086015190925061277a81612cf3565b939692955090935050565b60006020828403121561279757600080fd5b5035919050565b600080604083850312156127b157600080fd5b8235915060208084013567ffffffffffffffff808211156127d157600080fd5b818601915086601f8301126127e557600080fd5b8135818111156127f7576127f7612cb4565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561283a5761283a612cb4565b604052828152858101935084860182860187018b101561285957600080fd5b600095505b8386101561287c57803585526001959095019493860193860161285e565b508096505050505050509250929050565b60008060008060008060c087890312156128a657600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b6000602082840312156128e957600080fd5b8135610a0681612cf3565b60008060006060848603121561290957600080fd5b833561291481612cf3565b9250602084013561292481612ce3565b9150604084013561293481612cf3565b809150509250925092565b6000806040838503121561295257600080fd5b823561265681612cf3565b6000806040838503121561297057600080fd5b825161297b81612cf3565b602084015190925061298c81612cf3565b809150509250929050565b600080600080600060a086880312156129af57600080fd5b85356129ba81612cf3565b945060208601356129ca81612cf3565b93506129d8604087016125f4565b9250606086013591506129ed608087016125f4565b90509295509295909350565b600080600080600060a08688031215612a1157600080fd5b612a1a86612605565b94506020860151935060408601519250606086015191506129ed60808701612605565b6000815180845260005b81811015612a6357602081850181015186830182015201612a47565b81811115612a75576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610a066020830184612a3d565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c08084015261111860e0840182612a3d565b6000604082018483526020604081850152818551808452606086019150828701935060005b81811015612b5957845183529383019391830191600101612b3d565b5090979650505050505050565b60008219821115612b7957612b79612c56565b500190565b600063ffffffff808316818516808303821115612b9d57612b9d612c56565b01949350505050565b600060ff821660ff84168060ff03821115612bc357612bc3612c56565b019392505050565b600082612bda57612bda612c85565b500490565b600063ffffffff80841680612bf657612bf6612c85565b92169190910492915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612c3a57612c3a612c56565b500290565b600082821015612c5157612c51612c56565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61ffff81168114611c0f57600080fd5b63ffffffff81168114611c0f57600080fdfea164736f6c6343000806000a",
}
var VRFV2PlusWrapperABI = VRFV2PlusWrapperMetaData.ABI
@@ -524,6 +524,28 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperCallerSession) SLinkEthFeed() (common.A
return _VRFV2PlusWrapper.Contract.SLinkEthFeed(&_VRFV2PlusWrapper.CallOpts)
}
+func (_VRFV2PlusWrapper *VRFV2PlusWrapperCaller) SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _VRFV2PlusWrapper.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 (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusWrapper.Contract.SVrfCoordinator(&_VRFV2PlusWrapper.CallOpts)
+}
+
+func (_VRFV2PlusWrapper *VRFV2PlusWrapperCallerSession) SVrfCoordinator() (common.Address, error) {
+ return _VRFV2PlusWrapper.Contract.SVrfCoordinator(&_VRFV2PlusWrapper.CallOpts)
+}
+
func (_VRFV2PlusWrapper *VRFV2PlusWrapperCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) {
var out []interface{}
err := _VRFV2PlusWrapper.contract.Call(opts, &out, "typeAndVersion")
@@ -1203,6 +1225,8 @@ type VRFV2PlusWrapperInterface interface {
SLinkEthFeed(opts *bind.CallOpts) (common.Address, error)
+ SVrfCoordinator(opts *bind.CallOpts) (common.Address, error)
+
TypeAndVersion(opts *bind.CallOpts) (string, error)
AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error)
diff --git a/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt
index 55039c279d..66fb38dc7e 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
@@ -81,23 +81,24 @@ vrf_load_test_external_sub_owner: ../../contracts/solc/v0.8.6/VRFLoadTestExterna
vrf_load_test_ownerless_consumer: ../../contracts/solc/v0.8.6/VRFLoadTestOwnerlessConsumer.abi ../../contracts/solc/v0.8.6/VRFLoadTestOwnerlessConsumer.bin 74f914843cbc70b9c3079c3e1c709382ce415225e8bb40113e7ac018bfcb0f5c
vrf_load_test_with_metrics: ../../contracts/solc/v0.8.6/VRFV2LoadTestWithMetrics.abi ../../contracts/solc/v0.8.6/VRFV2LoadTestWithMetrics.bin 6c8f08fe8ae9254ae0607dffa5faf2d554488850aa788795b0445938488ad9ce
vrf_malicious_consumer_v2: ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2.abi ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2.bin 9755fa8ffc7f5f0b337d5d413d77b0c9f6cd6f68c31727d49acdf9d4a51bc522
-vrf_malicious_consumer_v2_plus: ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2Plus.abi ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2Plus.bin 0c8349f763bf7240127d9d1f788fbd32cae7df22489efda26df02093e3dba97e
+vrf_malicious_consumer_v2_plus: ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2Plus.abi ../../contracts/solc/v0.8.6/VRFMaliciousConsumerV2Plus.bin 9cfe6f12a086b459f1b841aa21144367a146bbaec3e850a6cd10ba0f1b141a71
vrf_owner: ../../contracts/solc/v0.8.6/VRFOwner.abi ../../contracts/solc/v0.8.6/VRFOwner.bin eccfae5ee295b5850e22f61240c469f79752b8d9a3bac5d64aec7ac8def2f6cb
vrf_owner_test_consumer: ../../contracts/solc/v0.8.6/VRFV2OwnerTestConsumer.abi ../../contracts/solc/v0.8.6/VRFV2OwnerTestConsumer.bin 9a53f1f6d23f6f9bd9781284d8406e4b0741d59d13da2bdf4a9e0a8754c88101
vrf_ownerless_consumer_example: ../../contracts/solc/v0.8.6/VRFOwnerlessConsumerExample.abi ../../contracts/solc/v0.8.6/VRFOwnerlessConsumerExample.bin 9893b3805863273917fb282eed32274e32aa3d5c2a67a911510133e1218132be
vrf_single_consumer_example: ../../contracts/solc/v0.8.6/VRFSingleConsumerExample.abi ../../contracts/solc/v0.8.6/VRFSingleConsumerExample.bin 892a5ed35da2e933f7fd7835cd6f7f70ef3aa63a9c03a22c5b1fd026711b0ece
-vrf_v2plus_load_test_with_metrics: ../../contracts/solc/v0.8.6/VRFV2PlusLoadTestWithMetrics.abi ../../contracts/solc/v0.8.6/VRFV2PlusLoadTestWithMetrics.bin 54ab18dbf7e802b9883e43e88ab2bdc7ef20e1bc057d866c59a299886562a36a
-vrf_v2plus_single_consumer: ../../contracts/solc/v0.8.6/VRFV2PlusSingleConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusSingleConsumerExample.bin ae52552860445980ebe6a6f38277ef2857672d41fff67ea440f4f2e1447ebdeb
-vrf_v2plus_sub_owner: ../../contracts/solc/v0.8.6/VRFV2PlusExternalSubOwnerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusExternalSubOwnerExample.bin 066cf1afa0079777f95437410c20abaef19d2898bf0675aa184212d7af7474a6
+vrf_v2plus_load_test_with_metrics: ../../contracts/solc/v0.8.6/VRFV2PlusLoadTestWithMetrics.abi ../../contracts/solc/v0.8.6/VRFV2PlusLoadTestWithMetrics.bin d880273009b88832eac6a83339e7dd0ac81a3f9ff9d601ce06efee7a8fa32cdb
+vrf_v2plus_single_consumer: ../../contracts/solc/v0.8.6/VRFV2PlusSingleConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusSingleConsumerExample.bin 5f05457ad1ece35b7cd5730bb2dee6c349484bfc58aefc61d643d1409b17f22b
+vrf_v2plus_sub_owner: ../../contracts/solc/v0.8.6/VRFV2PlusExternalSubOwnerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusExternalSubOwnerExample.bin 42e3aa5421a4898ad3eef1d5ec472d22a1ace259237263e4df582114d4437d0a
+vrf_v2plus_upgraded_version: ../../contracts/solc/v0.8.6/VRFCoordinatorV2PlusUpgradedVersion.abi ../../contracts/solc/v0.8.6/VRFCoordinatorV2PlusUpgradedVersion.bin 44bf27a0a9044e95be7c5467ede40ec5bb647f5e0bcbe82c27b252fb650b9265
vrfv2_proxy_admin: ../../contracts/solc/v0.8.6/VRFV2ProxyAdmin.abi ../../contracts/solc/v0.8.6/VRFV2ProxyAdmin.bin 30b6d1af9c4ae05daddda2afdab1877d857ab5321afe3540a01e94d5ded9bcef
vrfv2_reverting_example: ../../contracts/solc/v0.8.6/VRFV2RevertingExample.abi ../../contracts/solc/v0.8.6/VRFV2RevertingExample.bin 1ae46f80351d428bd85ba58b9041b2a608a1845300d79a8fed83edf96606de87
vrfv2_transparent_upgradeable_proxy: ../../contracts/solc/v0.8.6/VRFV2TransparentUpgradeableProxy.abi ../../contracts/solc/v0.8.6/VRFV2TransparentUpgradeableProxy.bin 84be44ffac513ef5b009d53846b76d3247ceb9fa0545dec2a0dd11606a915850
vrfv2_wrapper: ../../contracts/solc/v0.8.6/VRFV2Wrapper.abi ../../contracts/solc/v0.8.6/VRFV2Wrapper.bin ccbacaaf7fa058ced4998a3811ad6af15f1be07db20548b945f7569b99d85cbc
vrfv2_wrapper_consumer_example: ../../contracts/solc/v0.8.6/VRFV2WrapperConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2WrapperConsumerExample.bin 3c5c9f1c501e697a7e77e959b48767e2a0bb1372393fd7686f7aaef3eb794231
vrfv2_wrapper_interface: ../../contracts/solc/v0.8.6/VRFV2WrapperInterface.abi ../../contracts/solc/v0.8.6/VRFV2WrapperInterface.bin ff8560169de171a68b360b7438d13863682d07040d984fd0fb096b2379421003
-vrfv2plus_client: ../../contracts/solc/v0.8.6/VRFV2PlusClient.abi ../../contracts/solc/v0.8.6/VRFV2PlusClient.bin 3ffbfa4971a7e5f46051a26b1722613f265d89ea1867547ecec58500953a9501
-vrfv2plus_consumer_example: ../../contracts/solc/v0.8.6/VRFV2PlusConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusConsumerExample.bin 5cfc2977029d558dc6363a5d4953bb165d94932d248ea003dbb7ebf4b8b938bf
+vrfv2plus_client: ../../contracts/solc/v0.8.6/VRFV2PlusClient.abi ../../contracts/solc/v0.8.6/VRFV2PlusClient.bin bec10896851c433bb5997c96d96d9871b335924a59a8ab07d7062fcbc3992c6e
+vrfv2plus_consumer_example: ../../contracts/solc/v0.8.6/VRFV2PlusConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusConsumerExample.bin 4d1b1830b411592c7469e3928ad191fed25afc714f1e9947ccd41a5b528cc0ae
vrfv2plus_malicious_migrator: ../../contracts/solc/v0.8.6/VRFV2PlusMaliciousMigrator.abi ../../contracts/solc/v0.8.6/VRFV2PlusMaliciousMigrator.bin e5ae923d5fdfa916303cd7150b8474ccd912e14bafe950c6431f6ec94821f642
-vrfv2plus_reverting_example: ../../contracts/solc/v0.8.6/VRFV2PlusRevertingExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusRevertingExample.bin 93e8af756ad31107224560baf3472445af56300a7ad11cb8304c77707a73e082
-vrfv2plus_wrapper: ../../contracts/solc/v0.8.6/VRFV2PlusWrapper.abi ../../contracts/solc/v0.8.6/VRFV2PlusWrapper.bin 07060c74f3577d3c00b18f0101448a941617b959546bf9aeda272770327abd2a
+vrfv2plus_reverting_example: ../../contracts/solc/v0.8.6/VRFV2PlusRevertingExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusRevertingExample.bin d8f9b537f4f75535e3fca943d5f2d5b891fc63f38eb04e0c219fee28033883ae
+vrfv2plus_wrapper: ../../contracts/solc/v0.8.6/VRFV2PlusWrapper.abi ../../contracts/solc/v0.8.6/VRFV2PlusWrapper.bin d30c6232e24e7f6007bd9e46c23534d8da17fbf332f9dfd6485a476ef1be0af9
vrfv2plus_wrapper_consumer_example: ../../contracts/solc/v0.8.6/VRFV2PlusWrapperConsumerExample.abi ../../contracts/solc/v0.8.6/VRFV2PlusWrapperConsumerExample.bin d4ddf86da21b87c013f551b2563ab68712ea9d4724894664d5778f6b124f4e78
diff --git a/core/gethwrappers/go_generate.go b/core/gethwrappers/go_generate.go
index 3e394097b8..b145bb26a4 100644
--- a/core/gethwrappers/go_generate.go
+++ b/core/gethwrappers/go_generate.go
@@ -121,6 +121,7 @@ package gethwrappers
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFCoordinatorV2Plus_V2Example.abi ../../contracts/solc/v0.8.6/VRFCoordinatorV2Plus_V2Example.bin VRFCoordinatorV2Plus_V2Example vrf_coordinator_v2_plus_v2_example
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFV2PlusMaliciousMigrator.abi ../../contracts/solc/v0.8.6/VRFV2PlusMaliciousMigrator.bin VRFV2PlusMaliciousMigrator vrfv2plus_malicious_migrator
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFV2PlusLoadTestWithMetrics.abi ../../contracts/solc/v0.8.6/VRFV2PlusLoadTestWithMetrics.bin VRFV2PlusLoadTestWithMetrics vrf_v2plus_load_test_with_metrics
+//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFCoordinatorV2PlusUpgradedVersion.abi ../../contracts/solc/v0.8.6/VRFCoordinatorV2PlusUpgradedVersion.bin VRFCoordinatorV2PlusUpgradedVersion vrf_v2plus_upgraded_version
// Aggregators
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/AggregatorV2V3Interface.abi ../../contracts/solc/v0.8.6/AggregatorV2V3Interface.bin AggregatorV2V3Interface aggregator_v2v3_interface
diff --git a/integration-tests/actions/vrfv2plus/vrfv2plus_constants/constants.go b/integration-tests/actions/vrfv2plus/vrfv2plus_constants/constants.go
index 93850a6ab5..1ecb3a2418 100644
--- a/integration-tests/actions/vrfv2plus/vrfv2plus_constants/constants.go
+++ b/integration-tests/actions/vrfv2plus/vrfv2plus_constants/constants.go
@@ -2,6 +2,7 @@ package vrfv2plus_constants
import (
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2plus"
+ "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_v2plus_upgraded_version"
"math/big"
)
@@ -22,4 +23,9 @@ var (
FulfillmentFlatFeeLinkPPM: 500,
FulfillmentFlatFeeEthPPM: 500,
}
+
+ VRFCoordinatorV2PlusUpgradedVersionFeeConfig = vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionFeeConfig{
+ FulfillmentFlatFeeLinkPPM: 500,
+ FulfillmentFlatFeeEthPPM: 500,
+ }
)
diff --git a/integration-tests/actions/vrfv2plus/vrfv2plus_models.go b/integration-tests/actions/vrfv2plus/vrfv2plus_models.go
index fe0b93da25..eb98393c27 100644
--- a/integration-tests/actions/vrfv2plus/vrfv2plus_models.go
+++ b/integration-tests/actions/vrfv2plus/vrfv2plus_models.go
@@ -9,16 +9,22 @@ import (
type VRFV2PlusEncodedProvingKey [2]*big.Int
-// VRFV2PlusJobInfo defines a jobs into and proving key info
-type VRFV2PlusJobInfo struct {
- Job *client.Job
+// VRFV2PlusKeyData defines a jobs into and proving key info
+type VRFV2PlusKeyData struct {
VRFKey *client.VRFKey
EncodedProvingKey VRFV2PlusEncodedProvingKey
KeyHash [32]byte
}
+type VRFV2PlusData struct {
+ VRFV2PlusKeyData
+ VRFJob *client.Job
+ PrimaryEthAddress string
+ ChainID *big.Int
+}
+
type VRFV2PlusContracts struct {
- Coordinator contracts.VRFCoordinatorV2Plus
- BHS contracts.BlockHashStore
- LoadTestConsumer contracts.VRFv2PlusLoadTestConsumer
+ Coordinator contracts.VRFCoordinatorV2Plus
+ BHS contracts.BlockHashStore
+ LoadTestConsumers []contracts.VRFv2PlusLoadTestConsumer
}
diff --git a/integration-tests/actions/vrfv2plus/vrfv2plus_steps.go b/integration-tests/actions/vrfv2plus/vrfv2plus_steps.go
index b149fc4fdc..3ee226eba7 100644
--- a/integration-tests/actions/vrfv2plus/vrfv2plus_steps.go
+++ b/integration-tests/actions/vrfv2plus/vrfv2plus_steps.go
@@ -3,8 +3,10 @@ package vrfv2plus
import (
"context"
"fmt"
+ "github.com/ethereum/go-ethereum/common"
"github.com/google/uuid"
"github.com/pkg/errors"
+ "github.com/rs/zerolog"
"github.com/smartcontractkit/chainlink-testing-framework/blockchain"
"github.com/smartcontractkit/chainlink/integration-tests/actions"
"github.com/smartcontractkit/chainlink/integration-tests/actions/vrfv2plus/vrfv2plus_constants"
@@ -12,121 +14,126 @@ import (
"github.com/smartcontractkit/chainlink/integration-tests/contracts"
"github.com/smartcontractkit/chainlink/integration-tests/docker/test_env"
"github.com/smartcontractkit/chainlink/integration-tests/types/config/node"
+ "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2plus"
+ "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_v2plus_upgraded_version"
chainlinkutils "github.com/smartcontractkit/chainlink/v2/core/utils"
"math/big"
+ "time"
)
var (
- ErrNodePrimaryKey = "error getting node's primary ETH key"
- ErrCreatingProvingKeyHash = "error creating a keyHash from the proving key"
- ErrRegisteringProvingKey = "error registering a proving key on Coordinator contract"
- ErrRegisterProvingKey = "error registering proving keys"
- ErrEncodingProvingKey = "error encoding proving key"
- ErrCreatingVRFv2PlusKey = "error creating VRFv2Plus key"
- ErrDeployBlockHashStore = "error deploying blockhash store"
- ErrDeployCoordinator = "error deploying VRF CoordinatorV2Plus"
- ErrAdvancedConsumer = "error deploying VRFv2Plus Advanced Consumer"
- ErrABIEncodingFunding = "error Abi encoding subscriptionID"
- ErrSendingLinkToken = "error sending Link token"
- ErrCreatingVRFv2PlusJob = "error creating VRFv2Plus job"
- ErrParseJob = "error parsing job definition"
-
- ErrDeployVRFV2PlusContracts = "error deploying VRFV2Plus contracts"
- ErrSetVRFCoordinatorConfig = "error setting config for VRF Coordinator contract"
- ErrCreateVRFSubscription = "error creating VRF Subscription"
- ErrFindSubID = "error finding created subscription ID"
- ErrAddConsumerToSub = "error adding consumer to VRF Subscription"
- ErrFundSubWithNativeToken = "error funding subscription with native token"
- ErrSetLinkETHLinkFeed = "error setting Link and ETH/LINK feed for VRF Coordinator contract"
- ErrFundSubWithLinkToken = "error funding subscription with Link tokens"
- ErrCreateVRFV2PlusJobs = "error creating VRF V2 Plus Jobs"
- ErrGetPrimaryKey = "error getting primary ETH key address"
- ErrRestartCLNode = "error restarting CL node"
- ErrWaitTXsComplete = "error waiting for TXs to complete"
+ ErrNodePrimaryKey = "error getting node's primary ETH key"
+ ErrCreatingProvingKeyHash = "error creating a keyHash from the proving key"
+ ErrRegisteringProvingKey = "error registering a proving key on Coordinator contract"
+ ErrRegisterProvingKey = "error registering proving keys"
+ ErrEncodingProvingKey = "error encoding proving key"
+ ErrCreatingVRFv2PlusKey = "error creating VRFv2Plus key"
+ ErrDeployBlockHashStore = "error deploying blockhash store"
+ ErrDeployCoordinator = "error deploying VRF CoordinatorV2Plus"
+ ErrAdvancedConsumer = "error deploying VRFv2Plus Advanced Consumer"
+ ErrABIEncodingFunding = "error Abi encoding subscriptionID"
+ ErrSendingLinkToken = "error sending Link token"
+ ErrCreatingVRFv2PlusJob = "error creating VRFv2Plus job"
+ ErrParseJob = "error parsing job definition"
+ ErrDeployVRFV2PlusContracts = "error deploying VRFV2Plus contracts"
+ ErrSetVRFCoordinatorConfig = "error setting config for VRF Coordinator contract"
+ ErrCreateVRFSubscription = "error creating VRF Subscription"
+ ErrFindSubID = "error finding created subscription ID"
+ ErrAddConsumerToSub = "error adding consumer to VRF Subscription"
+ ErrFundSubWithNativeToken = "error funding subscription with native token"
+ ErrSetLinkETHLinkFeed = "error setting Link and ETH/LINK feed for VRF Coordinator contract"
+ ErrFundSubWithLinkToken = "error funding subscription with Link tokens"
+ ErrCreateVRFV2PlusJobs = "error creating VRF V2 Plus Jobs"
+ ErrGetPrimaryKey = "error getting primary ETH key address"
+ ErrRestartCLNode = "error restarting CL node"
+ ErrWaitTXsComplete = "error waiting for TXs to complete"
+ ErrRequestRandomness = "error requesting randomness"
+ ErrWaitRandomWordsRequestedEvent = "error waiting for RandomWordsRequested event"
+ ErrWaitRandomWordsFulfilledEvent = "error waiting for RandomWordsFulfilled event"
+ ErrLinkTotalBalance = "error waiting for RandomWordsFulfilled event"
+ ErrNativeTokenBalance = "error waiting for RandomWordsFulfilled event"
)
func DeployVRFV2PlusContracts(
contractDeployer contracts.ContractDeployer,
chainClient blockchain.EVMClient,
+ consumerContractsAmount int,
) (*VRFV2PlusContracts, error) {
bhs, err := contractDeployer.DeployBlockhashStore()
if err != nil {
return nil, errors.Wrap(err, ErrDeployBlockHashStore)
}
+ err = chainClient.WaitForEvents()
+ if err != nil {
+ return nil, errors.Wrap(err, ErrWaitTXsComplete)
+ }
coordinator, err := contractDeployer.DeployVRFCoordinatorV2Plus(bhs.Address())
if err != nil {
return nil, errors.Wrap(err, ErrDeployCoordinator)
}
- loadTestConsumer, err := contractDeployer.DeployVRFv2PlusLoadTestConsumer(coordinator.Address())
+ err = chainClient.WaitForEvents()
if err != nil {
- return nil, errors.Wrap(err, ErrAdvancedConsumer)
+ return nil, errors.Wrap(err, ErrWaitTXsComplete)
+ }
+ consumers, err := DeployConsumers(contractDeployer, coordinator, consumerContractsAmount)
+ if err != nil {
+ return nil, err
}
err = chainClient.WaitForEvents()
if err != nil {
return nil, errors.Wrap(err, ErrWaitTXsComplete)
}
- return &VRFV2PlusContracts{coordinator, bhs, loadTestConsumer}, nil
+ return &VRFV2PlusContracts{coordinator, bhs, consumers}, nil
}
-func CreateVRFV2PlusJobs(
- chainlinkNodes []*client.ChainlinkClient,
- coordinator contracts.VRFCoordinatorV2Plus,
- c blockchain.EVMClient,
- minIncomingConfirmations uint16,
-) ([]*VRFV2PlusJobInfo, error) {
- jobInfo := make([]*VRFV2PlusJobInfo, 0)
- for _, chainlinkNode := range chainlinkNodes {
- vrfKey, err := chainlinkNode.MustCreateVRFKey()
- if err != nil {
- return nil, errors.Wrap(err, ErrCreatingVRFv2PlusKey)
- }
- pubKeyCompressed := vrfKey.Data.ID
- jobUUID := uuid.New()
- os := &client.VRFV2PlusTxPipelineSpec{
- Address: coordinator.Address(),
- }
- ost, err := os.String()
- if err != nil {
- return nil, errors.Wrap(err, ErrParseJob)
- }
- nativeTokenPrimaryKeyAddress, err := chainlinkNode.PrimaryEthAddress()
- if err != nil {
- return nil, errors.Wrap(err, ErrNodePrimaryKey)
- }
- job, err := chainlinkNode.MustCreateJob(&client.VRFV2PlusJobSpec{
- Name: fmt.Sprintf("vrf-v2-plus-%s", jobUUID),
- CoordinatorAddress: coordinator.Address(),
- FromAddresses: []string{nativeTokenPrimaryKeyAddress},
- EVMChainID: c.GetChainID().String(),
- MinIncomingConfirmations: int(minIncomingConfirmations),
- PublicKey: pubKeyCompressed,
- ExternalJobID: jobUUID.String(),
- ObservationSource: ost,
- BatchFulfillmentEnabled: false,
- })
- if err != nil {
- return nil, errors.Wrap(err, ErrCreatingVRFv2PlusJob)
- }
- provingKey, err := VRFV2RegisterProvingKey(vrfKey, nativeTokenPrimaryKeyAddress, coordinator)
- if err != nil {
- return nil, errors.Wrap(err, ErrRegisteringProvingKey)
- }
- keyHash, err := coordinator.HashOfKey(context.Background(), provingKey)
+func DeployConsumers(contractDeployer contracts.ContractDeployer, coordinator contracts.VRFCoordinatorV2Plus, consumerContractsAmount int) ([]contracts.VRFv2PlusLoadTestConsumer, error) {
+ var consumers []contracts.VRFv2PlusLoadTestConsumer
+ for i := 1; i <= consumerContractsAmount; i++ {
+ loadTestConsumer, err := contractDeployer.DeployVRFv2PlusLoadTestConsumer(coordinator.Address())
if err != nil {
- return nil, errors.Wrap(err, ErrCreatingProvingKeyHash)
+ return nil, errors.Wrap(err, ErrAdvancedConsumer)
}
- ji := &VRFV2PlusJobInfo{
- Job: job,
- VRFKey: vrfKey,
- EncodedProvingKey: provingKey,
- KeyHash: keyHash,
- }
- jobInfo = append(jobInfo, ji)
+ consumers = append(consumers, loadTestConsumer)
+ }
+ return consumers, nil
+}
+
+func CreateVRFV2PlusJob(
+ chainlinkNode *client.ChainlinkClient,
+ coordinatorAddress string,
+ nativeTokenPrimaryKeyAddress string,
+ pubKeyCompressed string,
+ chainID string,
+ minIncomingConfirmations uint16,
+) (*client.Job, error) {
+ jobUUID := uuid.New()
+ os := &client.VRFV2PlusTxPipelineSpec{
+ Address: coordinatorAddress,
+ }
+ ost, err := os.String()
+ if err != nil {
+ return nil, errors.Wrap(err, ErrParseJob)
}
- return jobInfo, nil
+
+ job, err := chainlinkNode.MustCreateJob(&client.VRFV2PlusJobSpec{
+ Name: fmt.Sprintf("vrf-v2-plus-%s", jobUUID),
+ CoordinatorAddress: coordinatorAddress,
+ FromAddresses: []string{nativeTokenPrimaryKeyAddress},
+ EVMChainID: chainID,
+ MinIncomingConfirmations: int(minIncomingConfirmations),
+ PublicKey: pubKeyCompressed,
+ ExternalJobID: jobUUID.String(),
+ ObservationSource: ost,
+ BatchFulfillmentEnabled: false,
+ })
+ if err != nil {
+ return nil, errors.Wrap(err, ErrCreatingVRFv2PlusJob)
+ }
+
+ return job, nil
}
-func VRFV2RegisterProvingKey(
+func VRFV2PlusRegisterProvingKey(
vrfKey *client.VRFKey,
oracleAddress string,
coordinator contracts.VRFCoordinatorV2Plus,
@@ -145,6 +152,25 @@ func VRFV2RegisterProvingKey(
return provingKey, nil
}
+func VRFV2PlusUpgradedVersionRegisterProvingKey(
+ vrfKey *client.VRFKey,
+ oracleAddress string,
+ coordinator contracts.VRFCoordinatorV2PlusUpgradedVersion,
+) (VRFV2PlusEncodedProvingKey, error) {
+ provingKey, err := actions.EncodeOnChainVRFProvingKey(*vrfKey)
+ if err != nil {
+ return VRFV2PlusEncodedProvingKey{}, errors.Wrap(err, ErrEncodingProvingKey)
+ }
+ err = coordinator.RegisterProvingKey(
+ oracleAddress,
+ provingKey,
+ )
+ if err != nil {
+ return VRFV2PlusEncodedProvingKey{}, errors.Wrap(err, ErrRegisterProvingKey)
+ }
+ return provingKey, nil
+}
+
func FundVRFCoordinatorV2PlusSubscription(linkToken contracts.LinkToken, coordinator contracts.VRFCoordinatorV2Plus, chainClient blockchain.EVMClient, subscriptionID *big.Int, linkFundingAmount *big.Int) error {
encodedSubId, err := chainlinkutils.ABIEncode(`[{"type":"uint256"}]`, subscriptionID)
if err != nil {
@@ -161,16 +187,12 @@ func SetupVRFV2PlusEnvironment(
env *test_env.CLClusterTestEnv,
linkAddress contracts.LinkToken,
mockETHLinkFeedAddress contracts.MockETHLINKFeed,
-) (*test_env.CLClusterTestEnv, *VRFV2PlusContracts, *big.Int, *VRFV2PlusJobInfo, error) {
+ consumerContractsAmount int,
+) (*VRFV2PlusContracts, *big.Int, *VRFV2PlusData, error) {
- vrfv2PlusContracts, err := DeployVRFV2PlusContracts(env.ContractDeployer, env.EVMClient)
+ vrfv2PlusContracts, err := DeployVRFV2PlusContracts(env.ContractDeployer, env.EVMClient, consumerContractsAmount)
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrDeployVRFV2PlusContracts)
- }
-
- err = env.EVMClient.WaitForEvents()
- if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrWaitTXsComplete)
+ return nil, nil, nil, errors.Wrap(err, ErrDeployVRFV2PlusContracts)
}
err = vrfv2PlusContracts.Coordinator.SetConfig(
@@ -182,59 +204,69 @@ func SetupVRFV2PlusEnvironment(
vrfv2plus_constants.VRFCoordinatorV2PlusFeeConfig,
)
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrSetVRFCoordinatorConfig)
- }
- err = env.EVMClient.WaitForEvents()
- if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrWaitTXsComplete)
+ return nil, nil, nil, errors.Wrap(err, ErrSetVRFCoordinatorConfig)
}
- err = vrfv2PlusContracts.Coordinator.CreateSubscription()
+ subID, err := CreateSubAndFindSubID(env, vrfv2PlusContracts.Coordinator)
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrCreateVRFSubscription)
+ return nil, nil, nil, err
}
+
err = env.EVMClient.WaitForEvents()
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrWaitTXsComplete)
+ return nil, nil, nil, errors.Wrap(err, ErrWaitTXsComplete)
+ }
+ for _, consumer := range vrfv2PlusContracts.LoadTestConsumers {
+ err = vrfv2PlusContracts.Coordinator.AddConsumer(subID, consumer.Address())
+ if err != nil {
+ return nil, nil, nil, errors.Wrap(err, ErrAddConsumerToSub)
+ }
}
- subID, err := vrfv2PlusContracts.Coordinator.FindSubscriptionID()
+ err = vrfv2PlusContracts.Coordinator.SetLINKAndLINKETHFeed(linkAddress.Address(), mockETHLinkFeedAddress.Address())
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrFindSubID)
+ return nil, nil, nil, errors.Wrap(err, ErrSetLinkETHLinkFeed)
}
-
- err = vrfv2PlusContracts.Coordinator.AddConsumer(subID, vrfv2PlusContracts.LoadTestConsumer.Address())
+ err = env.EVMClient.WaitForEvents()
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrAddConsumerToSub)
+ return nil, nil, nil, errors.Wrap(err, ErrWaitTXsComplete)
}
-
- //Native Billing
- err = vrfv2PlusContracts.Coordinator.FundSubscriptionWithEth(subID, big.NewInt(0).Mul(vrfv2plus_constants.VRFSubscriptionFundingAmountNativeToken, big.NewInt(1e18)))
+ err = FundSubscription(env, linkAddress, vrfv2PlusContracts.Coordinator, subID)
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrFundSubWithNativeToken)
+ return nil, nil, nil, err
}
- //Link Billing
- err = vrfv2PlusContracts.Coordinator.SetLINKAndLINKETHFeed(linkAddress.Address(), mockETHLinkFeedAddress.Address())
+ vrfKey, err := env.GetAPIs()[0].MustCreateVRFKey()
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrSetLinkETHLinkFeed)
+ return nil, nil, nil, errors.Wrap(err, ErrCreatingVRFv2PlusKey)
}
- err = env.EVMClient.WaitForEvents()
+ pubKeyCompressed := vrfKey.Data.ID
+
+ nativeTokenPrimaryKeyAddress, err := env.GetAPIs()[0].PrimaryEthAddress()
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrWaitTXsComplete)
+ return nil, nil, nil, errors.Wrap(err, ErrNodePrimaryKey)
}
- err = FundVRFCoordinatorV2PlusSubscription(linkAddress, vrfv2PlusContracts.Coordinator, env.EVMClient, subID, vrfv2plus_constants.VRFSubscriptionFundingAmountLink)
+ provingKey, err := VRFV2PlusRegisterProvingKey(vrfKey, nativeTokenPrimaryKeyAddress, vrfv2PlusContracts.Coordinator)
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrFundSubWithLinkToken)
+ return nil, nil, nil, errors.Wrap(err, ErrRegisteringProvingKey)
}
- err = env.EVMClient.WaitForEvents()
+ keyHash, err := vrfv2PlusContracts.Coordinator.HashOfKey(context.Background(), provingKey)
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrWaitTXsComplete)
+ return nil, nil, nil, errors.Wrap(err, ErrCreatingProvingKeyHash)
}
- vrfV2PlusJobs, err := CreateVRFV2PlusJobs(env.GetAPIs(), vrfv2PlusContracts.Coordinator, env.EVMClient, vrfv2plus_constants.MinimumConfirmations)
+ chainID := env.EVMClient.GetChainID()
+
+ job, err := CreateVRFV2PlusJob(
+ env.GetAPIs()[0],
+ vrfv2PlusContracts.Coordinator.Address(),
+ nativeTokenPrimaryKeyAddress,
+ pubKeyCompressed,
+ chainID.String(),
+ vrfv2plus_constants.MinimumConfirmations,
+ )
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrCreateVRFV2PlusJobs)
+ return nil, nil, nil, errors.Wrap(err, ErrCreateVRFV2PlusJobs)
}
// this part is here because VRFv2 can work with only a specific key
@@ -242,14 +274,207 @@ func SetupVRFV2PlusEnvironment(
// Key = '...'
addr, err := env.CLNodes[0].API.PrimaryEthAddress()
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrGetPrimaryKey)
+ return nil, nil, nil, errors.Wrap(err, ErrGetPrimaryKey)
}
nodeConfig := node.NewConfig(env.CLNodes[0].NodeConfig,
node.WithVRFv2EVMEstimator(addr),
)
err = env.CLNodes[0].Restart(nodeConfig)
if err != nil {
- return nil, nil, nil, nil, errors.Wrap(err, ErrRestartCLNode)
+ return nil, nil, nil, errors.Wrap(err, ErrRestartCLNode)
}
- return env, vrfv2PlusContracts, subID, vrfV2PlusJobs[0], nil
+
+ vrfv2PlusKeyData := VRFV2PlusKeyData{
+ VRFKey: vrfKey,
+ EncodedProvingKey: provingKey,
+ KeyHash: keyHash,
+ }
+
+ data := VRFV2PlusData{
+ vrfv2PlusKeyData,
+ job,
+ nativeTokenPrimaryKeyAddress,
+ chainID,
+ }
+
+ return vrfv2PlusContracts, subID, &data, nil
+}
+
+func CreateSubAndFindSubID(env *test_env.CLClusterTestEnv, coordinator contracts.VRFCoordinatorV2Plus) (*big.Int, error) {
+ err := coordinator.CreateSubscription()
+ if err != nil {
+ return nil, errors.Wrap(err, ErrCreateVRFSubscription)
+ }
+ err = env.EVMClient.WaitForEvents()
+ if err != nil {
+ return nil, errors.Wrap(err, ErrWaitTXsComplete)
+ }
+ subID, err := coordinator.FindSubscriptionID()
+ if err != nil {
+ return nil, errors.Wrap(err, ErrFindSubID)
+ }
+ return subID, nil
+}
+
+func GetUpgradedCoordinatorTotalBalance(coordinator contracts.VRFCoordinatorV2PlusUpgradedVersion) (linkTotalBalance *big.Int, nativeTokenTotalBalance *big.Int, err error) {
+ linkTotalBalance, err = coordinator.GetLinkTotalBalance(context.Background())
+ if err != nil {
+ return nil, nil, errors.Wrap(err, ErrLinkTotalBalance)
+ }
+ nativeTokenTotalBalance, err = coordinator.GetNativeTokenTotalBalance(context.Background())
+ if err != nil {
+ return nil, nil, errors.Wrap(err, ErrNativeTokenBalance)
+ }
+ return
+}
+
+func GetCoordinatorTotalBalance(coordinator contracts.VRFCoordinatorV2Plus) (linkTotalBalance *big.Int, nativeTokenTotalBalance *big.Int, err error) {
+ linkTotalBalance, err = coordinator.GetLinkTotalBalance(context.Background())
+ if err != nil {
+ return nil, nil, errors.Wrap(err, ErrLinkTotalBalance)
+ }
+ nativeTokenTotalBalance, err = coordinator.GetNativeTokenTotalBalance(context.Background())
+ if err != nil {
+ return nil, nil, errors.Wrap(err, ErrNativeTokenBalance)
+ }
+ return
+}
+
+func FundSubscription(env *test_env.CLClusterTestEnv, linkAddress contracts.LinkToken, coordinator contracts.VRFCoordinatorV2Plus, subID *big.Int) error {
+ //Native Billing
+ err := coordinator.FundSubscriptionWithEth(subID, big.NewInt(0).Mul(vrfv2plus_constants.VRFSubscriptionFundingAmountNativeToken, big.NewInt(1e18)))
+ if err != nil {
+ return errors.Wrap(err, ErrFundSubWithNativeToken)
+ }
+
+ err = FundVRFCoordinatorV2PlusSubscription(linkAddress, coordinator, env.EVMClient, subID, vrfv2plus_constants.VRFSubscriptionFundingAmountLink)
+ if err != nil {
+ return errors.Wrap(err, ErrFundSubWithLinkToken)
+ }
+ err = env.EVMClient.WaitForEvents()
+ if err != nil {
+ return errors.Wrap(err, ErrWaitTXsComplete)
+ }
+
+ return nil
+}
+
+func RequestRandomnessAndWaitForFulfillment(
+ consumer contracts.VRFv2PlusLoadTestConsumer,
+ coordinator contracts.VRFCoordinatorV2Plus,
+ vrfv2PlusData *VRFV2PlusData,
+ subID *big.Int,
+ isNativeBilling bool,
+ l zerolog.Logger,
+) (*vrf_coordinator_v2plus.VRFCoordinatorV2PlusRandomWordsFulfilled, error) {
+ _, err := consumer.RequestRandomness(
+ vrfv2PlusData.KeyHash,
+ subID,
+ vrfv2plus_constants.MinimumConfirmations,
+ vrfv2plus_constants.CallbackGasLimit,
+ isNativeBilling,
+ vrfv2plus_constants.NumberOfWords,
+ vrfv2plus_constants.RandomnessRequestCountPerRequest,
+ )
+ if err != nil {
+ return nil, errors.Wrap(err, ErrRequestRandomness)
+ }
+
+ randomWordsRequestedEvent, err := coordinator.WaitForRandomWordsRequestedEvent(
+ [][32]byte{vrfv2PlusData.KeyHash},
+ []*big.Int{subID},
+ []common.Address{common.HexToAddress(consumer.Address())},
+ time.Minute*1,
+ )
+ if err != nil {
+ return nil, errors.Wrap(err, ErrWaitRandomWordsRequestedEvent)
+ }
+
+ l.Debug().
+ Interface("Request ID", randomWordsRequestedEvent.RequestId).
+ Interface("Subscription ID", randomWordsRequestedEvent.SubId).
+ Interface("Sender Address", randomWordsRequestedEvent.Sender.String()).
+ Interface("Keyhash", randomWordsRequestedEvent.KeyHash).
+ Interface("Callback Gas Limit", randomWordsRequestedEvent.CallbackGasLimit).
+ Interface("Number of Words", randomWordsRequestedEvent.NumWords).
+ Interface("Minimum Request Confirmations", randomWordsRequestedEvent.MinimumRequestConfirmations).
+ Msg("RandomnessRequested Event")
+
+ randomWordsFulfilledEvent, err := coordinator.WaitForRandomWordsFulfilledEvent(
+ []*big.Int{subID},
+ []*big.Int{randomWordsRequestedEvent.RequestId},
+ time.Minute*2,
+ )
+ if err != nil {
+ return nil, errors.Wrap(err, ErrWaitRandomWordsFulfilledEvent)
+ }
+
+ l.Debug().
+ Interface("Total Payment in Juels", randomWordsFulfilledEvent.Payment).
+ Interface("TX Hash", randomWordsFulfilledEvent.Raw.TxHash).
+ Interface("Subscription ID", randomWordsFulfilledEvent.SubID).
+ Interface("Request ID", randomWordsFulfilledEvent.RequestId).
+ Bool("Success", randomWordsFulfilledEvent.Success).
+ Msg("RandomWordsFulfilled Event (TX metadata)")
+ return randomWordsFulfilledEvent, err
+}
+
+func RequestRandomnessAndWaitForFulfillmentUpgraded(
+ consumer contracts.VRFv2PlusLoadTestConsumer,
+ coordinator contracts.VRFCoordinatorV2PlusUpgradedVersion,
+ vrfv2PlusData *VRFV2PlusData,
+ subID *big.Int,
+ isNativeBilling bool,
+ l zerolog.Logger,
+) (*vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled, error) {
+ _, err := consumer.RequestRandomness(
+ vrfv2PlusData.KeyHash,
+ subID,
+ vrfv2plus_constants.MinimumConfirmations,
+ vrfv2plus_constants.CallbackGasLimit,
+ isNativeBilling,
+ vrfv2plus_constants.NumberOfWords,
+ vrfv2plus_constants.RandomnessRequestCountPerRequest,
+ )
+ if err != nil {
+ return nil, errors.Wrap(err, ErrRequestRandomness)
+ }
+
+ randomWordsRequestedEvent, err := coordinator.WaitForRandomWordsRequestedEvent(
+ [][32]byte{vrfv2PlusData.KeyHash},
+ []*big.Int{subID},
+ []common.Address{common.HexToAddress(consumer.Address())},
+ time.Minute*1,
+ )
+ if err != nil {
+ return nil, errors.Wrap(err, ErrWaitRandomWordsRequestedEvent)
+ }
+
+ l.Debug().
+ Interface("Request ID", randomWordsRequestedEvent.RequestId).
+ Interface("Subscription ID", randomWordsRequestedEvent.SubId).
+ Interface("Sender Address", randomWordsRequestedEvent.Sender.String()).
+ Interface("Keyhash", randomWordsRequestedEvent.KeyHash).
+ Interface("Callback Gas Limit", randomWordsRequestedEvent.CallbackGasLimit).
+ Interface("Number of Words", randomWordsRequestedEvent.NumWords).
+ Interface("Minimum Request Confirmations", randomWordsRequestedEvent.MinimumRequestConfirmations).
+ Msg("RandomnessRequested Event")
+
+ randomWordsFulfilledEvent, err := coordinator.WaitForRandomWordsFulfilledEvent(
+ []*big.Int{subID},
+ []*big.Int{randomWordsRequestedEvent.RequestId},
+ time.Minute*2,
+ )
+ if err != nil {
+ return nil, errors.Wrap(err, ErrWaitRandomWordsFulfilledEvent)
+ }
+
+ l.Debug().
+ Interface("Total Payment in Juels", randomWordsFulfilledEvent.Payment).
+ Interface("TX Hash", randomWordsFulfilledEvent.Raw.TxHash).
+ Interface("Subscription ID", randomWordsFulfilledEvent.SubID).
+ Interface("Request ID", randomWordsFulfilledEvent.RequestId).
+ Bool("Success", randomWordsFulfilledEvent.Success).
+ Msg("RandomWordsFulfilled Event (TX metadata)")
+ return randomWordsFulfilledEvent, err
}
diff --git a/integration-tests/contracts/contract_deployer.go b/integration-tests/contracts/contract_deployer.go
index a3adb6db13..1242d3dc94 100644
--- a/integration-tests/contracts/contract_deployer.go
+++ b/integration-tests/contracts/contract_deployer.go
@@ -94,6 +94,7 @@ type ContractDeployer interface {
DeployVRFCoordinator(linkAddr string, bhsAddr string) (VRFCoordinator, error)
DeployVRFCoordinatorV2(linkAddr string, bhsAddr string, linkEthFeedAddr string) (VRFCoordinatorV2, error)
DeployVRFCoordinatorV2Plus(bhsAddr string) (VRFCoordinatorV2Plus, error)
+ DeployVRFCoordinatorV2PlusUpgradedVersion(bhsAddr string) (VRFCoordinatorV2PlusUpgradedVersion, error)
DeployDKG() (DKG, error)
DeployOCR2VRFCoordinator(beaconPeriodBlocksCount *big.Int, linkAddr string) (VRFCoordinatorV3, error)
DeployVRFBeacon(vrfCoordinatorAddress string, linkAddress string, dkgAddress string, keyId string) (VRFBeacon, error)
diff --git a/integration-tests/contracts/contract_vrf_models.go b/integration-tests/contracts/contract_vrf_models.go
index edc89d8cd5..491983c8c7 100644
--- a/integration-tests/contracts/contract_vrf_models.go
+++ b/integration-tests/contracts/contract_vrf_models.go
@@ -4,6 +4,7 @@ import (
"context"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2plus"
"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"
"math/big"
"time"
@@ -71,12 +72,53 @@ type VRFCoordinatorV2Plus interface {
) error
HashOfKey(ctx context.Context, pubKey [2]*big.Int) ([32]byte, error)
CreateSubscription() error
+ GetActiveSubscriptionIds(ctx context.Context, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error)
+ Migrate(subId *big.Int, coordinatorAddress string) error
+ RegisterMigratableCoordinator(migratableCoordinatorAddress string) error
AddConsumer(subId *big.Int, consumerAddress string) error
FundSubscriptionWithEth(subId *big.Int, nativeTokenAmount *big.Int) error
Address() string
GetSubscription(ctx context.Context, subID *big.Int) (vrf_coordinator_v2plus.GetSubscription, error)
+ GetNativeTokenTotalBalance(ctx context.Context) (*big.Int, error)
+ GetLinkTotalBalance(ctx context.Context) (*big.Int, error)
FindSubscriptionID() (*big.Int, error)
WaitForRandomWordsFulfilledEvent(subID []*big.Int, requestID []*big.Int, timeout time.Duration) (*vrf_coordinator_v2plus.VRFCoordinatorV2PlusRandomWordsFulfilled, error)
+ WaitForRandomWordsRequestedEvent(keyHash [][32]byte, subID []*big.Int, sender []common.Address, timeout time.Duration) (*vrf_coordinator_v2plus.VRFCoordinatorV2PlusRandomWordsRequested, error)
+ WaitForMigrationCompletedEvent(timeout time.Duration) (*vrf_coordinator_v2plus.VRFCoordinatorV2PlusMigrationCompleted, error)
+}
+
+type VRFCoordinatorV2PlusUpgradedVersion interface {
+ SetLINKAndLINKETHFeed(
+ link string,
+ linkEthFeed string,
+ ) error
+ SetConfig(
+ minimumRequestConfirmations uint16,
+ maxGasLimit uint32,
+ stalenessSeconds uint32,
+ gasAfterPaymentCalculation uint32,
+ fallbackWeiPerUnitLink *big.Int,
+ feeConfig vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionFeeConfig,
+ ) error
+ RegisterProvingKey(
+ oracleAddr string,
+ publicProvingKey [2]*big.Int,
+ ) error
+ HashOfKey(ctx context.Context, pubKey [2]*big.Int) ([32]byte, error)
+ CreateSubscription() error
+ GetNativeTokenTotalBalance(ctx context.Context) (*big.Int, error)
+ GetLinkTotalBalance(ctx context.Context) (*big.Int, error)
+ Migrate(subId *big.Int, coordinatorAddress string) error
+ RegisterMigratableCoordinator(migratableCoordinatorAddress string) error
+ AddConsumer(subId *big.Int, consumerAddress string) error
+ FundSubscriptionWithEth(subId *big.Int, nativeTokenAmount *big.Int) error
+ Address() string
+ GetSubscription(ctx context.Context, subID *big.Int) (vrf_v2plus_upgraded_version.GetSubscription, error)
+ GetActiveSubscriptionIds(ctx context.Context, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error)
+ FindSubscriptionID() (*big.Int, error)
+ WaitForRandomWordsFulfilledEvent(subID []*big.Int, requestID []*big.Int, timeout time.Duration) (*vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled, error)
+ WaitForMigrationCompletedEvent(timeout time.Duration) (*vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted, error)
+ WaitForRandomWordsRequestedEvent(keyHash [][32]byte, subID []*big.Int, sender []common.Address, timeout time.Duration) (*vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested, error)
}
type VRFConsumer interface {
@@ -116,10 +158,11 @@ type VRFv2LoadTestConsumer interface {
type VRFv2PlusLoadTestConsumer interface {
Address() string
- RequestRandomness(keyHash [32]byte, subID *big.Int, requestConfirmations uint16, callbackGasLimit uint32, nativePayment bool, numWords uint32, requestCount uint16) error
+ RequestRandomness(keyHash [32]byte, subID *big.Int, requestConfirmations uint16, callbackGasLimit uint32, nativePayment bool, numWords uint32, requestCount uint16) (*types.Transaction, error)
GetRequestStatus(ctx context.Context, requestID *big.Int) (vrf_v2plus_load_test_with_metrics.GetRequestStatus, error)
GetLastRequestId(ctx context.Context) (*big.Int, error)
GetLoadTestMetrics(ctx context.Context) (*VRFLoadTestMetrics, error)
+ GetCoordinator(ctx context.Context) (common.Address, error)
}
type DKG interface {
diff --git a/integration-tests/contracts/ethereum_vrfv2plus_contracts.go b/integration-tests/contracts/ethereum_vrfv2plus_contracts.go
index 12e33cac48..565cdaed4e 100644
--- a/integration-tests/contracts/ethereum_vrfv2plus_contracts.go
+++ b/integration-tests/contracts/ethereum_vrfv2plus_contracts.go
@@ -9,6 +9,7 @@ import (
"github.com/smartcontractkit/chainlink-testing-framework/blockchain"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2plus"
"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"
"math/big"
"time"
)
@@ -19,6 +20,12 @@ type EthereumVRFCoordinatorV2Plus struct {
coordinator *vrf_coordinator_v2plus.VRFCoordinatorV2Plus
}
+type EthereumVRFCoordinatorV2PlusUpgradedVersion struct {
+ address *common.Address
+ client blockchain.EVMClient
+ coordinator *vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersion
+}
+
// EthereumVRFv2PlusLoadTestConsumer represents VRFv2Plus consumer contract for performing Load Tests
type EthereumVRFv2PlusLoadTestConsumer struct {
address *common.Address
@@ -60,6 +67,18 @@ func (v *EthereumVRFCoordinatorV2Plus) HashOfKey(ctx context.Context, pubKey [2]
return hash, nil
}
+func (v *EthereumVRFCoordinatorV2Plus) GetActiveSubscriptionIds(ctx context.Context, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) {
+ opts := &bind.CallOpts{
+ From: common.HexToAddress(v.client.GetDefaultWallet().Address()),
+ Context: ctx,
+ }
+ activeSubscriptionIds, err := v.coordinator.GetActiveSubscriptionIds(opts, startIndex, maxCount)
+ if err != nil {
+ return nil, err
+ }
+ return activeSubscriptionIds, nil
+}
+
func (v *EthereumVRFCoordinatorV2Plus) GetSubscription(ctx context.Context, subID *big.Int) (vrf_coordinator_v2plus.GetSubscription, error) {
opts := &bind.CallOpts{
From: common.HexToAddress(v.client.GetDefaultWallet().Address()),
@@ -72,6 +91,29 @@ func (v *EthereumVRFCoordinatorV2Plus) GetSubscription(ctx context.Context, subI
return subscription, nil
}
+func (v *EthereumVRFCoordinatorV2Plus) GetLinkTotalBalance(ctx context.Context) (*big.Int, error) {
+ opts := &bind.CallOpts{
+ From: common.HexToAddress(v.client.GetDefaultWallet().Address()),
+ Context: ctx,
+ }
+ totalBalance, err := v.coordinator.STotalBalance(opts)
+ if err != nil {
+ return nil, err
+ }
+ return totalBalance, nil
+}
+func (v *EthereumVRFCoordinatorV2Plus) GetNativeTokenTotalBalance(ctx context.Context) (*big.Int, error) {
+ opts := &bind.CallOpts{
+ From: common.HexToAddress(v.client.GetDefaultWallet().Address()),
+ Context: ctx,
+ }
+ totalBalance, err := v.coordinator.STotalEthBalance(opts)
+ if err != nil {
+ return nil, err
+ }
+ return totalBalance, nil
+}
+
func (v *EthereumVRFCoordinatorV2Plus) SetConfig(minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, feeConfig vrf_coordinator_v2plus.VRFCoordinatorV2PlusFeeConfig) error {
opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
if err != nil {
@@ -135,6 +177,30 @@ func (v *EthereumVRFCoordinatorV2Plus) CreateSubscription() error {
return v.client.ProcessTransaction(tx)
}
+func (v *EthereumVRFCoordinatorV2Plus) Migrate(subId *big.Int, coordinatorAddress string) error {
+ opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
+ if err != nil {
+ return err
+ }
+ tx, err := v.coordinator.Migrate(opts, subId, common.HexToAddress(coordinatorAddress))
+ if err != nil {
+ return err
+ }
+ return v.client.ProcessTransaction(tx)
+}
+
+func (v *EthereumVRFCoordinatorV2Plus) RegisterMigratableCoordinator(migratableCoordinatorAddress string) error {
+ opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
+ if err != nil {
+ return err
+ }
+ tx, err := v.coordinator.RegisterMigratableCoordinator(opts, common.HexToAddress(migratableCoordinatorAddress))
+ if err != nil {
+ return err
+ }
+ return v.client.ProcessTransaction(tx)
+}
+
func (v *EthereumVRFCoordinatorV2Plus) AddConsumer(subId *big.Int, consumerAddress string) error {
opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
if err != nil {
@@ -204,19 +270,67 @@ func (v *EthereumVRFCoordinatorV2Plus) WaitForRandomWordsFulfilledEvent(subID []
}
}
+func (v *EthereumVRFCoordinatorV2Plus) WaitForRandomWordsRequestedEvent(keyHash [][32]byte, subID []*big.Int, sender []common.Address, timeout time.Duration) (*vrf_coordinator_v2plus.VRFCoordinatorV2PlusRandomWordsRequested, error) {
+ randomWordsFulfilledEventsChannel := make(chan *vrf_coordinator_v2plus.VRFCoordinatorV2PlusRandomWordsRequested)
+ subscription, err := v.coordinator.WatchRandomWordsRequested(nil, randomWordsFulfilledEventsChannel, keyHash, subID, sender)
+ 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 RandomWordsFulfilled event")
+ case randomWordsFulfilledEvent := <-randomWordsFulfilledEventsChannel:
+ return randomWordsFulfilledEvent, nil
+ }
+ }
+}
+
+func (v *EthereumVRFCoordinatorV2Plus) WaitForMigrationCompletedEvent(timeout time.Duration) (*vrf_coordinator_v2plus.VRFCoordinatorV2PlusMigrationCompleted, error) {
+ eventsChannel := make(chan *vrf_coordinator_v2plus.VRFCoordinatorV2PlusMigrationCompleted)
+ subscription, err := v.coordinator.WatchMigrationCompleted(nil, eventsChannel)
+ 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 MigrationCompleted event")
+ case migrationCompletedEvent := <-eventsChannel:
+ return migrationCompletedEvent, nil
+ }
+ }
+}
+
func (v *EthereumVRFv2PlusLoadTestConsumer) Address() string {
return v.address.Hex()
}
-func (v *EthereumVRFv2PlusLoadTestConsumer) RequestRandomness(keyHash [32]byte, subID *big.Int, requestConfirmations uint16, callbackGasLimit uint32, nativePayment bool, numWords uint32, requestCount uint16) error {
+func (v *EthereumVRFv2PlusLoadTestConsumer) RequestRandomness(keyHash [32]byte, subID *big.Int, requestConfirmations uint16, callbackGasLimit uint32, nativePayment bool, numWords uint32, requestCount uint16) (*types.Transaction, error) {
opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
if err != nil {
- return err
+ return nil, err
}
tx, err := v.consumer.RequestRandomWords(opts, subID, requestConfirmations, keyHash, callbackGasLimit, nativePayment, numWords, requestCount)
if err != nil {
- return err
+ return nil, err
}
- return v.client.ProcessTransaction(tx)
+
+ return tx, v.client.ProcessTransaction(tx)
+}
+
+func (v *EthereumVRFv2PlusLoadTestConsumer) GetCoordinator(ctx context.Context) (common.Address, error) {
+ return v.consumer.SVrfCoordinator(&bind.CallOpts{
+ From: common.HexToAddress(v.client.GetDefaultWallet().Address()),
+ Context: ctx,
+ })
}
func (v *EthereumVRFv2PlusLoadTestConsumer) GetRequestStatus(ctx context.Context, requestID *big.Int) (vrf_v2plus_load_test_with_metrics.GetRequestStatus, error) {
return v.consumer.GetRequestStatus(&bind.CallOpts{
@@ -279,3 +393,279 @@ func (v *EthereumVRFv2PlusLoadTestConsumer) GetLoadTestMetrics(ctx context.Conte
fastestFulfillment,
}, nil
}
+
+func (e *EthereumContractDeployer) DeployVRFCoordinatorV2PlusUpgradedVersion(bhsAddr string) (VRFCoordinatorV2PlusUpgradedVersion, error) {
+ address, _, instance, err := e.client.DeployContract("VRFCoordinatorV2PlusUpgradedVersion", func(
+ auth *bind.TransactOpts,
+ backend bind.ContractBackend,
+ ) (common.Address, *types.Transaction, interface{}, error) {
+ return vrf_v2plus_upgraded_version.DeployVRFCoordinatorV2PlusUpgradedVersion(auth, backend, common.HexToAddress(bhsAddr))
+ })
+ if err != nil {
+ return nil, err
+ }
+ return &EthereumVRFCoordinatorV2PlusUpgradedVersion{
+ client: e.client,
+ coordinator: instance.(*vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersion),
+ address: address,
+ }, err
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) Address() string {
+ return v.address.Hex()
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) HashOfKey(ctx context.Context, pubKey [2]*big.Int) ([32]byte, error) {
+ opts := &bind.CallOpts{
+ From: common.HexToAddress(v.client.GetDefaultWallet().Address()),
+ Context: ctx,
+ }
+ hash, err := v.coordinator.HashOfKey(opts, pubKey)
+ if err != nil {
+ return [32]byte{}, err
+ }
+ return hash, nil
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) GetActiveSubscriptionIds(ctx context.Context, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) {
+ opts := &bind.CallOpts{
+ From: common.HexToAddress(v.client.GetDefaultWallet().Address()),
+ Context: ctx,
+ }
+ activeSubscriptionIds, err := v.coordinator.GetActiveSubscriptionIds(opts, startIndex, maxCount)
+ if err != nil {
+ return nil, err
+ }
+ return activeSubscriptionIds, nil
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) GetSubscription(ctx context.Context, subID *big.Int) (vrf_v2plus_upgraded_version.GetSubscription, error) {
+ opts := &bind.CallOpts{
+ From: common.HexToAddress(v.client.GetDefaultWallet().Address()),
+ Context: ctx,
+ }
+ subscription, err := v.coordinator.GetSubscription(opts, subID)
+ if err != nil {
+ return vrf_v2plus_upgraded_version.GetSubscription{}, err
+ }
+ return subscription, nil
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) SetConfig(minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, feeConfig vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionFeeConfig) error {
+ opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
+ if err != nil {
+ return err
+ }
+ tx, err := v.coordinator.SetConfig(
+ opts,
+ minimumRequestConfirmations,
+ maxGasLimit,
+ stalenessSeconds,
+ gasAfterPaymentCalculation,
+ fallbackWeiPerUnitLink,
+ feeConfig,
+ )
+ if err != nil {
+ return err
+ }
+ return v.client.ProcessTransaction(tx)
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) SetLINKAndLINKETHFeed(linkAddress string, linkEthFeedAddress string) error {
+ opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
+ if err != nil {
+ return err
+ }
+ tx, err := v.coordinator.SetLINKAndLINKETHFeed(
+ opts,
+ common.HexToAddress(linkAddress),
+ common.HexToAddress(linkEthFeedAddress),
+ )
+ if err != nil {
+ return err
+ }
+ return v.client.ProcessTransaction(tx)
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) RegisterProvingKey(
+ oracleAddr string,
+ publicProvingKey [2]*big.Int,
+) error {
+ opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
+ if err != nil {
+ return err
+ }
+ tx, err := v.coordinator.RegisterProvingKey(opts, common.HexToAddress(oracleAddr), publicProvingKey)
+ if err != nil {
+ return err
+ }
+ return v.client.ProcessTransaction(tx)
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) CreateSubscription() error {
+ opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
+ if err != nil {
+ return err
+ }
+ tx, err := v.coordinator.CreateSubscription(opts)
+ if err != nil {
+ return err
+ }
+ return v.client.ProcessTransaction(tx)
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) GetLinkTotalBalance(ctx context.Context) (*big.Int, error) {
+ opts := &bind.CallOpts{
+ From: common.HexToAddress(v.client.GetDefaultWallet().Address()),
+ Context: ctx,
+ }
+ totalBalance, err := v.coordinator.STotalBalance(opts)
+ if err != nil {
+ return nil, err
+ }
+ return totalBalance, nil
+}
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) GetNativeTokenTotalBalance(ctx context.Context) (*big.Int, error) {
+ opts := &bind.CallOpts{
+ From: common.HexToAddress(v.client.GetDefaultWallet().Address()),
+ Context: ctx,
+ }
+ totalBalance, err := v.coordinator.STotalEthBalance(opts)
+ if err != nil {
+ return nil, err
+ }
+ return totalBalance, nil
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) Migrate(subId *big.Int, coordinatorAddress string) error {
+ opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
+ if err != nil {
+ return err
+ }
+ tx, err := v.coordinator.Migrate(opts, subId, common.HexToAddress(coordinatorAddress))
+ if err != nil {
+ return err
+ }
+ return v.client.ProcessTransaction(tx)
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) RegisterMigratableCoordinator(migratableCoordinatorAddress string) error {
+ opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
+ if err != nil {
+ return err
+ }
+ tx, err := v.coordinator.RegisterMigratableCoordinator(opts, common.HexToAddress(migratableCoordinatorAddress))
+ if err != nil {
+ return err
+ }
+ return v.client.ProcessTransaction(tx)
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) AddConsumer(subId *big.Int, consumerAddress string) error {
+ opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
+ if err != nil {
+ return err
+ }
+ tx, err := v.coordinator.AddConsumer(
+ opts,
+ subId,
+ common.HexToAddress(consumerAddress),
+ )
+ if err != nil {
+ return err
+ }
+ return v.client.ProcessTransaction(tx)
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) FundSubscriptionWithEth(subId *big.Int, nativeTokenAmount *big.Int) error {
+ opts, err := v.client.TransactionOpts(v.client.GetDefaultWallet())
+ if err != nil {
+ return err
+ }
+ opts.Value = nativeTokenAmount
+ tx, err := v.coordinator.FundSubscriptionWithEth(
+ opts,
+ subId,
+ )
+ if err != nil {
+ return err
+ }
+ return v.client.ProcessTransaction(tx)
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) FindSubscriptionID() (*big.Int, error) {
+ owner := v.client.GetDefaultWallet().Address()
+ subscriptionIterator, err := v.coordinator.FilterSubscriptionCreated(
+ nil,
+ nil,
+ )
+ 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 (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) WaitForRandomWordsFulfilledEvent(subID []*big.Int, requestID []*big.Int, timeout time.Duration) (*vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled, error) {
+ randomWordsFulfilledEventsChannel := make(chan *vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionRandomWordsFulfilled)
+ subscription, err := v.coordinator.WatchRandomWordsFulfilled(nil, randomWordsFulfilledEventsChannel, requestID, subID)
+ 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 RandomWordsFulfilled event")
+ case randomWordsFulfilledEvent := <-randomWordsFulfilledEventsChannel:
+ return randomWordsFulfilledEvent, nil
+ }
+ }
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) WaitForMigrationCompletedEvent(timeout time.Duration) (*vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted, error) {
+ eventsChannel := make(chan *vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionMigrationCompleted)
+ subscription, err := v.coordinator.WatchMigrationCompleted(nil, eventsChannel)
+ 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 MigrationCompleted event")
+ case migrationCompletedEvent := <-eventsChannel:
+ return migrationCompletedEvent, nil
+ }
+ }
+}
+
+func (v *EthereumVRFCoordinatorV2PlusUpgradedVersion) WaitForRandomWordsRequestedEvent(keyHash [][32]byte, subID []*big.Int, sender []common.Address, timeout time.Duration) (*vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested, error) {
+ eventsChannel := make(chan *vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionRandomWordsRequested)
+ subscription, err := v.coordinator.WatchRandomWordsRequested(nil, eventsChannel, keyHash, subID, sender)
+ 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 RandomWordsRequested event")
+ case randomWordsRequestedEvent := <-eventsChannel:
+ return randomWordsRequestedEvent, nil
+ }
+ }
+}
diff --git a/integration-tests/smoke/vrfv2plus_test.go b/integration-tests/smoke/vrfv2plus_test.go
index bec31c5681..f21ca2d3c6 100644
--- a/integration-tests/smoke/vrfv2plus_test.go
+++ b/integration-tests/smoke/vrfv2plus_test.go
@@ -2,6 +2,7 @@ package smoke
import (
"context"
+ "github.com/pkg/errors"
"math/big"
"testing"
"time"
@@ -41,7 +42,7 @@ func TestVRFv2PlusBilling(t *testing.T) {
linkAddress, err := actions.DeployLINKToken(env.ContractDeployer)
require.NoError(t, err, "error deploying LINK contract")
- env, vrfv2PlusContracts, subID, job, err := vrfv2plus.SetupVRFV2PlusEnvironment(env, linkAddress, mockETHLinkFeedAddress)
+ vrfv2PlusContracts, subID, vrfv2PlusData, err := vrfv2plus.SetupVRFV2PlusEnvironment(env, linkAddress, mockETHLinkFeedAddress, 1)
require.NoError(t, err, "error setting up VRF v2 Plus env")
subscription, err := vrfv2PlusContracts.Coordinator.GetSubscription(context.Background(), subID)
@@ -51,37 +52,27 @@ func TestVRFv2PlusBilling(t *testing.T) {
Interface("Juels Balance", subscription.Balance).
Interface("Native Token Balance", subscription.EthBalance).
Interface("Subscription ID", subID).
+ Interface("Subscription Owner", subscription.Owner.String()).
+ Interface("Subscription Consumers", subscription.Consumers).
Msg("Subscription Data")
t.Run("VRFV2 Plus With Link Billing", func(t *testing.T) {
var isNativeBilling = false
subBalanceBeforeRequest := subscription.Balance
- jobRunsBeforeTest, err := env.CLNodes[0].API.MustReadRunsByJob(job.Job.Data.ID)
+ jobRunsBeforeTest, err := env.CLNodes[0].API.MustReadRunsByJob(vrfv2PlusData.VRFJob.Data.ID)
require.NoError(t, err, "error reading job runs")
// test and assert
- err = vrfv2PlusContracts.LoadTestConsumer.RequestRandomness(
- job.KeyHash,
+ randomWordsFulfilledEvent, err := vrfv2plus.RequestRandomnessAndWaitForFulfillment(
+ vrfv2PlusContracts.LoadTestConsumers[0],
+ vrfv2PlusContracts.Coordinator,
+ vrfv2PlusData,
subID,
- vrfv2plus_constants.MinimumConfirmations,
- vrfv2plus_constants.CallbackGasLimit,
isNativeBilling,
- vrfv2plus_constants.NumberOfWords,
- vrfv2plus_constants.RandomnessRequestCountPerRequest,
+ l,
)
- require.NoError(t, err, "error requesting randomness")
-
- randomWordsFulfilledEvent, err := vrfv2PlusContracts.Coordinator.WaitForRandomWordsFulfilledEvent([]*big.Int{subID}, nil, time.Minute*2)
- require.NoError(t, err, "error waiting for RandomWordsFulfilled event")
-
- l.Debug().
- Interface("Total Payment in Juels", randomWordsFulfilledEvent.Payment).
- Interface("TX Hash", randomWordsFulfilledEvent.Raw.TxHash).
- Interface("Subscription ID", randomWordsFulfilledEvent.SubID).
- Interface("Request ID", randomWordsFulfilledEvent.RequestId).
- Bool("Success", randomWordsFulfilledEvent.Success).
- Msg("Randomness Fulfillment TX metadata")
+ require.NoError(t, err, "error requesting randomness and waiting for fulfilment")
expectedSubBalanceJuels := new(big.Int).Sub(subBalanceBeforeRequest, randomWordsFulfilledEvent.Payment)
subscription, err = vrfv2PlusContracts.Coordinator.GetSubscription(context.Background(), subID)
@@ -89,11 +80,11 @@ func TestVRFv2PlusBilling(t *testing.T) {
subBalanceAfterRequest := subscription.Balance
require.Equal(t, expectedSubBalanceJuels, subBalanceAfterRequest)
- jobRuns, err := env.CLNodes[0].API.MustReadRunsByJob(job.Job.Data.ID)
+ jobRuns, err := env.CLNodes[0].API.MustReadRunsByJob(vrfv2PlusData.VRFJob.Data.ID)
require.NoError(t, err, "error reading job runs")
require.Equal(t, len(jobRunsBeforeTest.Data)+1, len(jobRuns.Data))
- status, err := vrfv2PlusContracts.LoadTestConsumer.GetRequestStatus(context.Background(), randomWordsFulfilledEvent.RequestId)
+ status, err := vrfv2PlusContracts.LoadTestConsumers[0].GetRequestStatus(context.Background(), randomWordsFulfilledEvent.RequestId)
require.NoError(t, err, "error getting rand request status")
require.True(t, status.Fulfilled)
l.Debug().Interface("Fulfilment Status", status.Fulfilled).Msg("Random Words Request Fulfilment Status")
@@ -109,43 +100,30 @@ func TestVRFv2PlusBilling(t *testing.T) {
var isNativeBilling = true
subNativeTokenBalanceBeforeRequest := subscription.EthBalance
- jobRunsBeforeTest, err := env.CLNodes[0].API.MustReadRunsByJob(job.Job.Data.ID)
+ jobRunsBeforeTest, err := env.CLNodes[0].API.MustReadRunsByJob(vrfv2PlusData.VRFJob.Data.ID)
require.NoError(t, err, "error reading job runs")
// test and assert
- err = vrfv2PlusContracts.LoadTestConsumer.RequestRandomness(
- job.KeyHash,
+ randomWordsFulfilledEvent, err := vrfv2plus.RequestRandomnessAndWaitForFulfillment(
+ vrfv2PlusContracts.LoadTestConsumers[0],
+ vrfv2PlusContracts.Coordinator,
+ vrfv2PlusData,
subID,
- vrfv2plus_constants.MinimumConfirmations,
- vrfv2plus_constants.CallbackGasLimit,
isNativeBilling,
- vrfv2plus_constants.NumberOfWords,
- vrfv2plus_constants.RandomnessRequestCountPerRequest,
+ l,
)
- require.NoError(t, err, "error requesting randomness")
-
- randomWordsFulfilledEvent, err := vrfv2PlusContracts.Coordinator.WaitForRandomWordsFulfilledEvent([]*big.Int{subID}, nil, time.Minute*2)
- require.NoError(t, err, "error waiting for RandomWordsFulfilled event")
-
- l.Debug().
- Interface("Total Payment in Wei", randomWordsFulfilledEvent.Payment).
- Interface("TX Hash", randomWordsFulfilledEvent.Raw.TxHash).
- Interface("Subscription ID", randomWordsFulfilledEvent.SubID).
- Interface("Request ID", randomWordsFulfilledEvent.RequestId).
- Bool("Success", randomWordsFulfilledEvent.Success).
- Msg("Randomness Fulfillment TX metadata")
-
+ require.NoError(t, err, "error requesting randomness and waiting for fulfilment")
expectedSubBalanceWei := new(big.Int).Sub(subNativeTokenBalanceBeforeRequest, randomWordsFulfilledEvent.Payment)
subscription, err = vrfv2PlusContracts.Coordinator.GetSubscription(context.Background(), subID)
require.NoError(t, err)
subBalanceAfterRequest := subscription.EthBalance
require.Equal(t, expectedSubBalanceWei, subBalanceAfterRequest)
- jobRuns, err := env.CLNodes[0].API.MustReadRunsByJob(job.Job.Data.ID)
+ jobRuns, err := env.CLNodes[0].API.MustReadRunsByJob(vrfv2PlusData.VRFJob.Data.ID)
require.NoError(t, err, "error reading job runs")
require.Equal(t, len(jobRunsBeforeTest.Data)+1, len(jobRuns.Data))
- status, err := vrfv2PlusContracts.LoadTestConsumer.GetRequestStatus(context.Background(), randomWordsFulfilledEvent.RequestId)
+ status, err := vrfv2PlusContracts.LoadTestConsumers[0].GetRequestStatus(context.Background(), randomWordsFulfilledEvent.RequestId)
require.NoError(t, err, "error getting rand request status")
require.True(t, status.Fulfilled)
l.Debug().Interface("Fulfilment Status", status.Fulfilled).Msg("Random Words Request Fulfilment Status")
@@ -158,3 +136,193 @@ func TestVRFv2PlusBilling(t *testing.T) {
})
}
+func TestVRFv2PlusMigration(t *testing.T) {
+ t.Parallel()
+ l := logging.GetTestLogger(t)
+
+ env, err := test_env.NewCLTestEnvBuilder().
+ WithTestLogger(t).
+ WithGeth().
+ WithCLNodes(1).
+ WithFunding(vrfv2plus_constants.ChainlinkNodeFundingAmountEth).
+ Build()
+ require.NoError(t, err, "error creating test env")
+ t.Cleanup(func() {
+ if err := env.Cleanup(t); err != nil {
+ l.Error().Err(err).Msg("Error cleaning up test environment")
+ }
+ })
+
+ env.ParallelTransactions(true)
+
+ mockETHLinkFeedAddress, err := actions.DeployMockETHLinkFeed(env.ContractDeployer, vrfv2plus_constants.LinkEthFeedResponse)
+ require.NoError(t, err, "error deploying mock ETH/LINK feed")
+
+ linkAddress, err := actions.DeployLINKToken(env.ContractDeployer)
+ require.NoError(t, err, "error deploying LINK contract")
+
+ vrfv2PlusContracts, subID, vrfv2PlusData, err := vrfv2plus.SetupVRFV2PlusEnvironment(env, linkAddress, mockETHLinkFeedAddress, 2)
+ require.NoError(t, err, "error setting up VRF v2 Plus env")
+
+ subscription, err := vrfv2PlusContracts.Coordinator.GetSubscription(context.Background(), subID)
+ require.NoError(t, err, "error getting subscription information")
+
+ l.Debug().
+ Interface("Juels Balance", subscription.Balance).
+ Interface("Native Token Balance", subscription.EthBalance).
+ Interface("Subscription ID", subID).
+ Interface("Subscription Owner", subscription.Owner.String()).
+ Interface("Subscription Consumers", subscription.Consumers).
+ Msg("Subscription Data")
+
+ activeSubIdsOldCoordinatorBeforeMigration, err := vrfv2PlusContracts.Coordinator.GetActiveSubscriptionIds(context.Background(), big.NewInt(0), big.NewInt(0))
+ require.NoError(t, err, "error occurred getting active sub ids")
+ require.Len(t, activeSubIdsOldCoordinatorBeforeMigration, 1, "Active Sub Ids length is not equal to 1")
+ require.Equal(t, subID, activeSubIdsOldCoordinatorBeforeMigration[0])
+
+ oldSubscriptionBeforeMigration, err := vrfv2PlusContracts.Coordinator.GetSubscription(context.Background(), subID)
+ require.NoError(t, err, "error getting subscription information")
+
+ //Migration Process
+ newCoordinator, err := env.ContractDeployer.DeployVRFCoordinatorV2PlusUpgradedVersion(vrfv2PlusContracts.BHS.Address())
+ require.NoError(t, err, "error deploying VRF CoordinatorV2PlusUpgradedVersion")
+
+ err = env.EVMClient.WaitForEvents()
+ require.NoError(t, err, vrfv2plus.ErrWaitTXsComplete)
+
+ _, err = vrfv2plus.VRFV2PlusUpgradedVersionRegisterProvingKey(vrfv2PlusData.VRFKey, vrfv2PlusData.PrimaryEthAddress, newCoordinator)
+ require.NoError(t, err, errors.Wrap(err, vrfv2plus.ErrRegisteringProvingKey))
+
+ err = newCoordinator.SetConfig(
+ vrfv2plus_constants.MinimumConfirmations,
+ vrfv2plus_constants.MaxGasLimitVRFCoordinatorConfig,
+ vrfv2plus_constants.StalenessSeconds,
+ vrfv2plus_constants.GasAfterPaymentCalculation,
+ vrfv2plus_constants.LinkEthFeedResponse,
+ vrfv2plus_constants.VRFCoordinatorV2PlusUpgradedVersionFeeConfig,
+ )
+
+ err = newCoordinator.SetLINKAndLINKETHFeed(linkAddress.Address(), mockETHLinkFeedAddress.Address())
+ require.NoError(t, err, vrfv2plus.ErrSetLinkETHLinkFeed)
+ err = env.EVMClient.WaitForEvents()
+ require.NoError(t, err, vrfv2plus.ErrWaitTXsComplete)
+
+ _, err = vrfv2plus.CreateVRFV2PlusJob(
+ env.GetAPIs()[0],
+ newCoordinator.Address(),
+ vrfv2PlusData.PrimaryEthAddress,
+ vrfv2PlusData.VRFKey.Data.ID,
+ vrfv2PlusData.ChainID.String(),
+ vrfv2plus_constants.MinimumConfirmations,
+ )
+ require.NoError(t, err, vrfv2plus.ErrCreateVRFV2PlusJobs)
+
+ err = vrfv2PlusContracts.Coordinator.RegisterMigratableCoordinator(newCoordinator.Address())
+ require.NoError(t, err, "error registering migratable coordinator")
+
+ err = env.EVMClient.WaitForEvents()
+ require.NoError(t, err, vrfv2plus.ErrWaitTXsComplete)
+
+ oldCoordinatorLinkTotalBalanceBeforeMigration, oldCoordinatorEthTotalBalanceBeforeMigration, err := vrfv2plus.GetCoordinatorTotalBalance(vrfv2PlusContracts.Coordinator)
+ require.NoError(t, err)
+
+ migratedCoordinatorLinkTotalBalanceBeforeMigration, migratedCoordinatorEthTotalBalanceBeforeMigration, err := vrfv2plus.GetUpgradedCoordinatorTotalBalance(newCoordinator)
+ require.NoError(t, err)
+
+ err = env.EVMClient.WaitForEvents()
+ require.NoError(t, err, vrfv2plus.ErrWaitTXsComplete)
+
+ err = vrfv2PlusContracts.Coordinator.Migrate(subID, newCoordinator.Address())
+ require.NoError(t, err, "error migrating sub id ", subID.String(), " from ", vrfv2PlusContracts.Coordinator.Address(), " to new Coordinator address ", newCoordinator.Address())
+ migrationCompletedEvent, err := vrfv2PlusContracts.Coordinator.WaitForMigrationCompletedEvent(time.Minute * 1)
+ require.NoError(t, err, "error waiting for MigrationCompleted event")
+ err = env.EVMClient.WaitForEvents()
+ require.NoError(t, err, vrfv2plus.ErrWaitTXsComplete)
+
+ l.Debug().
+ Str("Subscription ID", migrationCompletedEvent.SubId.String()).
+ Str("Migrated From Coordinator", vrfv2PlusContracts.Coordinator.Address()).
+ Str("Migrated To Coordinator", migrationCompletedEvent.NewCoordinator.String()).
+ Msg("MigrationCompleted Event")
+
+ oldCoordinatorLinkTotalBalanceAfterMigration, oldCoordinatorEthTotalBalanceAfterMigration, err := vrfv2plus.GetCoordinatorTotalBalance(vrfv2PlusContracts.Coordinator)
+ require.NoError(t, err)
+
+ migratedCoordinatorLinkTotalBalanceAfterMigration, migratedCoordinatorEthTotalBalanceAfterMigration, err := vrfv2plus.GetUpgradedCoordinatorTotalBalance(newCoordinator)
+ require.NoError(t, err)
+
+ migratedSubscription, err := newCoordinator.GetSubscription(context.Background(), subID)
+ require.NoError(t, err, "error getting subscription information")
+
+ l.Debug().
+ Interface("New Coordinator", newCoordinator.Address()).
+ Interface("Subscription ID", subID).
+ Interface("Juels Balance", migratedSubscription.Balance).
+ Interface("Native Token Balance", migratedSubscription.EthBalance).
+ Interface("Subscription Owner", migratedSubscription.Owner.String()).
+ Interface("Subscription Consumers", migratedSubscription.Consumers).
+ Msg("Subscription Data After Migration to New Coordinator")
+
+ //Verify that Coordinators were updated in Consumers
+ for _, consumer := range vrfv2PlusContracts.LoadTestConsumers {
+ coordinatorAddressInConsumerAfterMigration, err := consumer.GetCoordinator(context.Background())
+ require.NoError(t, err, "error getting Coordinator from Consumer contract")
+ require.Equal(t, newCoordinator.Address(), coordinatorAddressInConsumerAfterMigration.String())
+ l.Debug().
+ Interface("Consumer", consumer.Address()).
+ Interface("Coordinator", coordinatorAddressInConsumerAfterMigration).
+ Msg("Coordinator Address in Consumer After Migration")
+ }
+
+ //Verify old and migrated subs
+ require.Equal(t, oldSubscriptionBeforeMigration.EthBalance, migratedSubscription.EthBalance)
+ require.Equal(t, oldSubscriptionBeforeMigration.Balance, migratedSubscription.Balance)
+ require.Equal(t, oldSubscriptionBeforeMigration.Owner, migratedSubscription.Owner)
+ require.Equal(t, oldSubscriptionBeforeMigration.Consumers, migratedSubscription.Consumers)
+
+ //Verify that old sub was deleted from old Coordinator
+ _, err = vrfv2PlusContracts.Coordinator.GetSubscription(context.Background(), subID)
+ require.Error(t, err, "error not occurred when trying to get deleted subscription from old Coordinator after sub migration")
+
+ _, err = vrfv2PlusContracts.Coordinator.GetActiveSubscriptionIds(context.Background(), big.NewInt(0), big.NewInt(0))
+ require.Error(t, err, "error not occurred getting active sub ids. Should occur since it should revert when sub id array is empty")
+
+ activeSubIdsMigratedCoordinator, err := newCoordinator.GetActiveSubscriptionIds(context.Background(), big.NewInt(0), big.NewInt(0))
+ require.NoError(t, err, "error occurred getting active sub ids")
+ require.Len(t, activeSubIdsMigratedCoordinator, 1, "Active Sub Ids length is not equal to 1 for Migrated Coordinator after migration")
+ require.Equal(t, subID, activeSubIdsMigratedCoordinator[0])
+
+ //Verify that total balances changed for Link and Eth for new and old coordinator
+ expectedLinkTotalBalanceForMigratedCoordinator := new(big.Int).Add(oldSubscriptionBeforeMigration.Balance, migratedCoordinatorLinkTotalBalanceBeforeMigration)
+ expectedEthTotalBalanceForMigratedCoordinator := new(big.Int).Add(oldSubscriptionBeforeMigration.EthBalance, migratedCoordinatorEthTotalBalanceBeforeMigration)
+
+ expectedLinkTotalBalanceForOldCoordinator := new(big.Int).Sub(oldCoordinatorLinkTotalBalanceBeforeMigration, oldSubscriptionBeforeMigration.Balance)
+ expectedEthTotalBalanceForOldCoordinator := new(big.Int).Sub(oldCoordinatorEthTotalBalanceBeforeMigration, oldSubscriptionBeforeMigration.EthBalance)
+ require.Equal(t, expectedLinkTotalBalanceForMigratedCoordinator, migratedCoordinatorLinkTotalBalanceAfterMigration)
+ require.Equal(t, expectedEthTotalBalanceForMigratedCoordinator, migratedCoordinatorEthTotalBalanceAfterMigration)
+ require.Equal(t, expectedLinkTotalBalanceForOldCoordinator, oldCoordinatorLinkTotalBalanceAfterMigration)
+ require.Equal(t, expectedEthTotalBalanceForOldCoordinator, oldCoordinatorEthTotalBalanceAfterMigration)
+
+ //Verify rand requests fulfills with Link Token billing
+ _, err = vrfv2plus.RequestRandomnessAndWaitForFulfillmentUpgraded(
+ vrfv2PlusContracts.LoadTestConsumers[0],
+ newCoordinator,
+ vrfv2PlusData,
+ subID,
+ false,
+ l,
+ )
+ require.NoError(t, err, "error requesting randomness and waiting for fulfilment")
+
+ //Verify rand requests fulfills with Native Token billing
+ _, err = vrfv2plus.RequestRandomnessAndWaitForFulfillmentUpgraded(
+ vrfv2PlusContracts.LoadTestConsumers[1],
+ newCoordinator,
+ vrfv2PlusData,
+ subID,
+ true,
+ l,
+ )
+ require.NoError(t, err, "error requesting randomness and waiting for fulfilment")
+
+}
From 617af45bfa161e7a5f0369e12bae7da0e6565c27 Mon Sep 17 00:00:00 2001
From: amit-momin <108959691+amit-momin@users.noreply.github.com>
Date: Mon, 18 Sep 2023 13:31:20 -0500
Subject: [PATCH 11/31] Removed pg opts from VRF CreateTransaction calls
(#10664)
---
core/services/vrf/v2/listener_v2.go | 4 ++--
core/services/vrf/v2/listener_v2_types.go | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/services/vrf/v2/listener_v2.go b/core/services/vrf/v2/listener_v2.go
index 2eb10f64c8..13214d7f2c 100644
--- a/core/services/vrf/v2/listener_v2.go
+++ b/core/services/vrf/v2/listener_v2.go
@@ -923,7 +923,7 @@ func (lsn *listenerV2) enqueueForceFulfillment(
RequestTxHash: &requestTxHash,
// No max link since simulation failed
},
- }, pg.WithQueryer(tx), pg.WithParentCtx(ctx))
+ })
return err
})
return
@@ -1137,7 +1137,7 @@ func (lsn *listenerV2) processRequestsPerSubHelper(
VRFCoordinatorAddress: &coordinatorAddress,
VRFRequestBlockNumber: new(big.Int).SetUint64(p.req.req.Raw().BlockNumber),
},
- }, pg.WithQueryer(tx), pg.WithParentCtx(ctx))
+ })
return err
})
if err != nil {
diff --git a/core/services/vrf/v2/listener_v2_types.go b/core/services/vrf/v2/listener_v2_types.go
index c1e3b46b26..4ad645ac17 100644
--- a/core/services/vrf/v2/listener_v2_types.go
+++ b/core/services/vrf/v2/listener_v2_types.go
@@ -193,7 +193,7 @@ func (lsn *listenerV2) processBatch(
GlobalSubID: txMetaGlobalSubID,
RequestTxHashes: txHashes,
},
- }, pg.WithQueryer(tx))
+ })
return errors.Wrap(err, "create batch fulfillment eth transaction")
})
From 6e86a7092897fa9bf8389eb8bc3b4f4345775ec5 Mon Sep 17 00:00:00 2001
From: Justin Kaseman
Date: Mon, 18 Sep 2023 15:48:54 -0400
Subject: [PATCH 12/31] (test): Functions foundry tests use OCR contracts & a
higher tx.gasprice (#10635)
* (test): Functions foundry tests use OCR contracts & a higher tx.gasprice
* (test): Add natspec comments to setup helpers
* Set tx.gasprice in config rather than test setup
---
contracts/foundry.toml | 1 +
.../gas-snapshots/functions.gas-snapshot | 78 +--
.../functions/tests/v1_0_0/BaseTest.t.sol | 4 +
.../tests/v1_0_0/FunctionsCoordinator.t.sol | 2 +-
.../tests/v1_0_0/FunctionsRouter.t.sol | 401 ++++++--------
.../tests/v1_0_0/FunctionsSubscriptions.t.sol | 14 +-
.../v0.8/functions/tests/v1_0_0/Setup.t.sol | 524 ++++++++++++------
7 files changed, 576 insertions(+), 448 deletions(-)
diff --git a/contracts/foundry.toml b/contracts/foundry.toml
index 3b98f94458..d1bec52c39 100644
--- a/contracts/foundry.toml
+++ b/contracts/foundry.toml
@@ -20,6 +20,7 @@ block_number = 12345
solc_version = '0.8.19'
src = 'src/v0.8/functions'
test = 'src/v0.8/functions/tests'
+gas_price = 3000000000
[profile.vrf]
optimizer_runs = 1000
diff --git a/contracts/gas-snapshots/functions.gas-snapshot b/contracts/gas-snapshots/functions.gas-snapshot
index 9b501e677b..0664a2eb99 100644
--- a/contracts/gas-snapshots/functions.gas-snapshot
+++ b/contracts/gas-snapshots/functions.gas-snapshot
@@ -13,17 +13,17 @@ FunctionsOracle_setRegistry:testSetRegistrySuccess() (gas: 35791)
FunctionsOracle_setRegistry:testSetRegistry_gas() (gas: 31987)
FunctionsOracle_typeAndVersion:testTypeAndVersionSuccess() (gas: 6905)
FunctionsRouter_Constructor:test_Constructor_Success() (gas: 12073)
-FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedCostExceedsCommitment() (gas: 48079)
-FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInsufficientGas() (gas: 38613)
-FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidCommitment() (gas: 36022)
-FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidRequestId() (gas: 35147)
-FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedSubscriptionBalanceInvariant() (gas: 210)
-FunctionsRouter_Fulfill:test_Fulfill_RevertIfNotCommittedCoordinator() (gas: 27993)
-FunctionsRouter_Fulfill:test_Fulfill_RevertIfPaused() (gas: 33184)
-FunctionsRouter_Fulfill:test_Fulfill_SuccessClientNoLongerExists() (gas: 93416)
-FunctionsRouter_Fulfill:test_Fulfill_SuccessFulfilled() (gas: 103212)
-FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackReverts() (gas: 1762498)
-FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackRunsOutOfGas() (gas: 205574)
+FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedCostExceedsCommitment() (gas: 172948)
+FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInsufficientGas() (gas: 163234)
+FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidCommitment() (gas: 38092)
+FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidRequestId() (gas: 35224)
+FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedSubscriptionBalanceInvariant() (gas: 181443)
+FunctionsRouter_Fulfill:test_Fulfill_RevertIfNotCommittedCoordinator() (gas: 28063)
+FunctionsRouter_Fulfill:test_Fulfill_RevertIfPaused() (gas: 156949)
+FunctionsRouter_Fulfill:test_Fulfill_SuccessClientNoLongerExists() (gas: 297578)
+FunctionsRouter_Fulfill:test_Fulfill_SuccessFulfilled() (gas: 311147)
+FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackReverts() (gas: 2076842)
+FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackRunsOutOfGas() (gas: 515646)
FunctionsRouter_GetAdminFee:test_GetAdminFee_Success() (gas: 18005)
FunctionsRouter_GetAllowListId:test_GetAllowListId_Success() (gas: 12926)
FunctionsRouter_GetConfig:test_GetConfig_Success() (gas: 37136)
@@ -38,13 +38,13 @@ FunctionsRouter_IsValidCallbackGasLimit:test_IsValidCallbackGasLimit_Success() (
FunctionsRouter_Pause:test_Pause_RevertIfNotOwner() (gas: 13315)
FunctionsRouter_Pause:test_Pause_Success() (gas: 20298)
FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfEmptyAddress() (gas: 14768)
-FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfExceedsMaxProposal() (gas: 22661)
+FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfExceedsMaxProposal() (gas: 21670)
FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfLengthMismatch() (gas: 14647)
FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfNotNewContract() (gas: 19025)
-FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfNotOwner() (gas: 23326)
-FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_Success() (gas: 118413)
+FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfNotOwner() (gas: 23369)
+FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_Success() (gas: 118456)
FunctionsRouter_SendRequest:test_SendRequest_RevertIfConsumerNotAllowed() (gas: 59304)
-FunctionsRouter_SendRequest:test_SendRequest_RevertIfDuplicateRequestId() (gas: 192143)
+FunctionsRouter_SendRequest:test_SendRequest_RevertIfDuplicateRequestId() (gas: 192134)
FunctionsRouter_SendRequest:test_SendRequest_RevertIfEmptyData() (gas: 29405)
FunctionsRouter_SendRequest:test_SendRequest_RevertIfIncorrectDonId() (gas: 57926)
FunctionsRouter_SendRequest:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 185987)
@@ -70,21 +70,21 @@ FunctionsRouter_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 24437)
FunctionsRouter_UpdateConfig:test_UpdateConfig_Success() (gas: 60653)
FunctionsRouter_UpdateContracts:test_UpdateContracts_RevertIfNotOwner() (gas: 13293)
FunctionsRouter_UpdateContracts:test_UpdateContracts_Success() (gas: 38716)
-FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfNotAllowedSender() (gas: 60333)
+FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfNotAllowedSender() (gas: 60324)
FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfPaused() (gas: 60962)
-FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfSenderBecomesBlocked() (gas: 94681)
+FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfSenderBecomesBlocked() (gas: 94675)
FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfSenderIsNotNewOwner() (gas: 62691)
FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_Success() (gas: 59679)
FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumers() (gas: 137833)
FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumersAfterConfigUpdate() (gas: 164777)
FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNoSubscription() (gas: 12926)
FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNotAllowedSender() (gas: 57789)
-FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNotSubscriptionOwner() (gas: 87166)
+FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNotSubscriptionOwner() (gas: 87142)
FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfPaused() (gas: 18051)
FunctionsSubscriptions_AddConsumer:test_AddConsumer_Success() (gas: 95481)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNoSubscription() (gas: 15085)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotAllowedSender() (gas: 57929)
-FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotSubscriptionOwner() (gas: 89340)
+FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotSubscriptionOwner() (gas: 89316)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPaused() (gas: 20191)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPendingRequests() (gas: 193277)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitAllBalanceAsDeposit() (gas: 113352)
@@ -139,38 +139,38 @@ FunctionsSubscriptions_RecoverFunds:test_RecoverFunds_Success() (gas: 41093)
FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfInvalidConsumer() (gas: 30238)
FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNoSubscription() (gas: 14997)
FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNotAllowedSender() (gas: 57778)
-FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNotSubscriptionOwner() (gas: 87210)
+FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNotSubscriptionOwner() (gas: 87186)
FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPaused() (gas: 18004)
-FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPendingRequests() (gas: 190701)
+FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPendingRequests() (gas: 190709)
FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_Success() (gas: 41979)
FunctionsSubscriptions_SetFlags:test_SetFlags_RevertIfNoSubscription() (gas: 12847)
FunctionsSubscriptions_SetFlags:test_SetFlags_RevertIfNotOwner() (gas: 15640)
FunctionsSubscriptions_SetFlags:test_SetFlags_Success() (gas: 35549)
-FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_RevertIfPaused() (gas: 25859)
-FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_RevertIfTimeoutNotExceeded() (gas: 25188)
-FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_RevertInvalidRequest() (gas: 28142)
-FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_Success() (gas: 57634)
+FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_RevertIfPaused() (gas: 25910)
+FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_RevertIfTimeoutNotExceeded() (gas: 25239)
+FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_RevertInvalidRequest() (gas: 28220)
+FunctionsSubscriptions_TimeoutRequests:test_TimeoutRequests_Success() (gas: 57730)
FunctionsSubscriptions_createSubscription:test_CreateSubscription_RevertIfNotAllowedSender() (gas: 26368)
FunctionsSubscriptions_createSubscription:test_CreateSubscription_RevertIfPaused() (gas: 15714)
FunctionsSubscriptions_createSubscription:test_CreateSubscription_Success() (gas: 152510)
-FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_RevertIfAcceptorIsNotSender() (gas: 25855)
-FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_RevertIfBlockedSender() (gas: 44366)
-FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_RevertIfInvalidSigner() (gas: 23615)
-FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_RevertIfRecipientContractIsNotSender() (gas: 1458273)
-FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_RevertIfRecipientIsNotSender() (gas: 26021)
-FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_SuccessIfAcceptingForContract() (gas: 1538382)
-FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_SuccessIfAcceptingForSelf() (gas: 94702)
+FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_RevertIfAcceptorIsNotSender() (gas: 25837)
+FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_RevertIfBlockedSender() (gas: 44348)
+FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_RevertIfInvalidSigner() (gas: 23597)
+FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_RevertIfRecipientContractIsNotSender() (gas: 1458254)
+FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_RevertIfRecipientIsNotSender() (gas: 26003)
+FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_SuccessIfAcceptingForContract() (gas: 1538373)
+FunctionsTermsOfServiceAllowList_AcceptTermsOfService:test_AcceptTermsOfService_SuccessIfAcceptingForSelf() (gas: 94684)
FunctionsTermsOfServiceAllowList_BlockSender:test_BlockSender_RevertIfNotOwner() (gas: 15469)
-FunctionsTermsOfServiceAllowList_BlockSender:test_BlockSender_Success() (gas: 50442)
+FunctionsTermsOfServiceAllowList_BlockSender:test_BlockSender_Success() (gas: 50421)
FunctionsTermsOfServiceAllowList_Constructor:test_Constructor_Success() (gas: 12187)
FunctionsTermsOfServiceAllowList_GetAllAllowedSenders:test_GetAllAllowedSenders_Success() (gas: 19243)
FunctionsTermsOfServiceAllowList_GetConfig:test_GetConfig_Success() (gas: 15773)
-FunctionsTermsOfServiceAllowList_GetMessage:test_GetMessage_Success() (gas: 11592)
-FunctionsTermsOfServiceAllowList_HasAccess:test_HasAccess_FalseWhenEnabled() (gas: 15931)
-FunctionsTermsOfServiceAllowList_HasAccess:test_HasAccess_TrueWhenDisabled() (gas: 23445)
+FunctionsTermsOfServiceAllowList_GetMessage:test_GetMessage_Success() (gas: 11583)
+FunctionsTermsOfServiceAllowList_HasAccess:test_HasAccess_FalseWhenEnabled() (gas: 15925)
+FunctionsTermsOfServiceAllowList_HasAccess:test_HasAccess_TrueWhenDisabled() (gas: 23430)
FunctionsTermsOfServiceAllowList_IsBlockedSender:test_IsBlockedSender_SuccessFalse() (gas: 15354)
FunctionsTermsOfServiceAllowList_IsBlockedSender:test_IsBlockedSender_SuccessTrue() (gas: 41957)
FunctionsTermsOfServiceAllowList_UnblockSender:test_UnblockSender_RevertIfNotOwner() (gas: 13525)
-FunctionsTermsOfServiceAllowList_UnblockSender:test_UnblockSender_Success() (gas: 95208)
-FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 13736)
-FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_Success() (gas: 22082)
\ No newline at end of file
+FunctionsTermsOfServiceAllowList_UnblockSender:test_UnblockSender_Success() (gas: 95184)
+FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 13727)
+FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_Success() (gas: 22073)
\ No newline at end of file
diff --git a/contracts/src/v0.8/functions/tests/v1_0_0/BaseTest.t.sol b/contracts/src/v0.8/functions/tests/v1_0_0/BaseTest.t.sol
index d01e438a92..b012732897 100644
--- a/contracts/src/v0.8/functions/tests/v1_0_0/BaseTest.t.sol
+++ b/contracts/src/v0.8/functions/tests/v1_0_0/BaseTest.t.sol
@@ -11,6 +11,10 @@ contract BaseTest is Test {
uint256 internal STRANGER_PRIVATE_KEY = 0x2;
address internal STRANGER_ADDRESS = vm.addr(STRANGER_PRIVATE_KEY);
+ uint256 TX_GASPRICE_START = 3000000000; // 3 gwei
+
+ uint72 constant JUELS_PER_LINK = 1e18;
+
function setUp() public virtual {
// BaseTest.setUp is often called multiple times from tests' setUp due to inheritance.
if (s_baseTestInitialized) return;
diff --git a/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsCoordinator.t.sol b/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsCoordinator.t.sol
index 2773baa47a..088de631d0 100644
--- a/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsCoordinator.t.sol
+++ b/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsCoordinator.t.sol
@@ -173,7 +173,7 @@ contract FunctionsBilling_EstimateCost is FunctionsSubscriptionSetup {
callbackGasLimit,
gasPriceWei
);
- uint96 expectedCostEstimate = 15725380;
+ uint96 expectedCostEstimate = 10873200;
assertEq(costEstimate, expectedCostEstimate);
}
}
diff --git a/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsRouter.t.sol b/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsRouter.t.sol
index e4bf442ec1..1a858c28df 100644
--- a/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsRouter.t.sol
+++ b/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsRouter.t.sol
@@ -817,19 +817,21 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup {
function test_Fulfill_RevertIfPaused() public {
s_functionsRouter.pause();
- // Send as committed Coordinator
- vm.stopPrank();
- vm.startPrank(address(s_functionsCoordinator));
+ uint256 requestToFulfill = 1;
- bytes memory response = bytes("hello world!");
+ uint256[] memory requestNumberKeys = new uint256[](1);
+ requestNumberKeys[0] = requestToFulfill;
+
+ string[] memory results = new string[](1);
+ string memory response = "hello world!";
+ results[0] = response;
+
+ bytes[] memory errors = new bytes[](1);
bytes memory err = new bytes(0);
- uint96 juelsPerGas = 0;
- uint96 costWithoutCallback = 0;
- address transmitter = NOP_TRANSMITTER_ADDRESS_1;
- FunctionsResponse.Commitment memory commitment = s_requestCommitment;
+ errors[0] = err;
vm.expectRevert("Pausable: paused");
- s_functionsRouter.fulfill(response, err, juelsPerGas, costWithoutCallback, transmitter, commitment);
+ _reportAndStore(requestNumberKeys, results, errors, NOP_TRANSMITTER_ADDRESS_1, false);
}
function test_Fulfill_RevertIfNotCommittedCoordinator() public {
@@ -842,7 +844,7 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup {
uint96 juelsPerGas = 0;
uint96 costWithoutCallback = 0;
address transmitter = NOP_TRANSMITTER_ADDRESS_1;
- FunctionsResponse.Commitment memory commitment = s_requestCommitment;
+ FunctionsResponse.Commitment memory commitment = s_requests[1].commitment;
vm.expectRevert(FunctionsRouter.OnlyCallableFromCoordinator.selector);
s_functionsRouter.fulfill(response, err, juelsPerGas, costWithoutCallback, transmitter, commitment);
@@ -865,7 +867,7 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup {
uint96 juelsPerGas = 0;
uint96 costWithoutCallback = 0;
address transmitter = NOP_TRANSMITTER_ADDRESS_1;
- FunctionsResponse.Commitment memory commitment = s_requestCommitment;
+ FunctionsResponse.Commitment memory commitment = s_requests[1].commitment;
// Modify request commitment to have a invalid requestId
bytes32 invalidRequestId = bytes32("this does not exist");
commitment.requestId = invalidRequestId;
@@ -877,7 +879,7 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup {
bool checkData = true;
vm.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData);
emit RequestNotProcessed({
- requestId: s_requestCommitment.requestId,
+ requestId: s_requests[1].requestId,
coordinator: address(s_functionsCoordinator),
transmitter: NOP_TRANSMITTER_ADDRESS_1,
resultCode: FunctionsResponse.FulfillResult.INVALID_REQUEST_ID
@@ -906,7 +908,7 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup {
uint96 juelsPerGas = 0;
uint96 costWithoutCallback = 0;
address transmitter = NOP_TRANSMITTER_ADDRESS_1;
- FunctionsResponse.Commitment memory commitment = s_requestCommitment;
+ FunctionsResponse.Commitment memory commitment = s_requests[1].commitment;
// Modify request commitment to have charge more than quoted
commitment.estimatedTotalCostJuels = 10 * JUELS_PER_LINK; // 10 LINK
@@ -917,7 +919,7 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup {
bool checkData = true;
vm.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData);
emit RequestNotProcessed({
- requestId: s_requestCommitment.requestId,
+ requestId: s_requests[1].requestId,
coordinator: address(s_functionsCoordinator),
transmitter: NOP_TRANSMITTER_ADDRESS_1,
resultCode: FunctionsResponse.FulfillResult.INVALID_COMMITMENT
@@ -937,114 +939,115 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup {
}
function test_Fulfill_RequestNotProcessedInsufficientGas() public {
- // Send as committed Coordinator
- vm.stopPrank();
- vm.startPrank(address(s_functionsCoordinator));
+ uint256 requestToFulfill = 1;
- bytes memory response = bytes("hello world!");
+ uint256[] memory requestNumberKeys = new uint256[](1);
+ requestNumberKeys[0] = requestToFulfill;
+
+ string[] memory results = new string[](1);
+ string memory response = "hello world!";
+ results[0] = response;
+
+ bytes[] memory errors = new bytes[](1);
bytes memory err = new bytes(0);
- uint96 juelsPerGas = 0;
- uint96 costWithoutCallback = 0;
- address transmitter = NOP_TRANSMITTER_ADDRESS_1;
+ errors[0] = err;
- vm.txGasPrice(1);
+ uint32 callbackGasLimit = s_requests[requestToFulfill].requestData.callbackGasLimit;
+ // Coordinator sends enough gas that would get through callback and payment, but fail after
+ uint256 gasToUse = getCoordinatorConfig().gasOverheadBeforeCallback + callbackGasLimit + 100000;
- // topic0 (function signature, always checked), NOT topic1 (false), NOT topic2 (false), NOT topic3 (false), and data (true).
- bool checkTopic1 = false;
+ // topic0 (function signature, always checked), topic1 (true), NOT topic2 (false), NOT topic3 (false), and data (true).
+ bool checkTopic1RequestId = true;
bool checkTopic2 = false;
bool checkTopic3 = false;
bool checkData = true;
- vm.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData);
+ vm.expectEmit(checkTopic1RequestId, checkTopic2, checkTopic3, checkData);
emit RequestNotProcessed({
- requestId: s_requestCommitment.requestId,
+ requestId: s_requests[requestToFulfill].requestId,
coordinator: address(s_functionsCoordinator),
transmitter: NOP_TRANSMITTER_ADDRESS_1,
resultCode: FunctionsResponse.FulfillResult.INSUFFICIENT_GAS_PROVIDED
});
- // Coordinator sends enough gas that would get through callback and payment, but fail after
- uint32 callbackGasLimit = 5000;
- uint256 gasToUse = getCoordinatorConfig().gasOverheadBeforeCallback + callbackGasLimit;
- (FunctionsResponse.FulfillResult resultCode, uint96 callbackGasCostJuels) = s_functionsRouter.fulfill{
- gas: gasToUse
- }(response, err, juelsPerGas, costWithoutCallback, transmitter, s_requestCommitment);
-
- assertEq(uint(resultCode), uint(FunctionsResponse.FulfillResult.INSUFFICIENT_GAS_PROVIDED));
- assertEq(callbackGasCostJuels, 0);
+ _reportAndStore(requestNumberKeys, results, errors, NOP_TRANSMITTER_ADDRESS_1, false, 1, gasToUse);
}
function test_Fulfill_RequestNotProcessedSubscriptionBalanceInvariant() public {
- // // Send as committed Coordinator
- // vm.stopPrank();
- // vm.startPrank(address(s_functionsCoordinator));
- // bytes memory response = bytes("hello world!");
- // bytes memory err = new bytes(0);
- // uint96 juelsPerGas = 0;
- // uint96 costWithoutCallback = 0;
- // address transmitter = NOP_TRANSMITTER_ADDRESS_1;
- // FunctionsResponse.Commitment memory commitment = s_requestCommitment;
- // TODO: use contract helper to change subscription balance
- // // topic0 (function signature, always checked), NOT topic1 (false), NOT topic2 (false), NOT topic3 (false), and data (true).
- // bool checkTopic1 = false;
- // bool checkTopic2 = false;
- // bool checkTopic3 = false;
- // bool checkData = true;
- // vm.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData);
- // emit RequestNotProcessed({
- // requestId: s_requestCommitment.requestId,
- // coordinator: address(s_functionsCoordinator),
- // transmitter: NOP_TRANSMITTER_ADDRESS_1,
- // resultCode: FunctionsResponse.FulfillResult.SUBSCRIPTION_BALANCE_INVARIANT_VIOLATION
- // });
- // (FunctionsResponse.FulfillResult resultCode, uint96 callbackGasCostJuels) = s_functionsRouter.fulfill(
- // response,
- // err,
- // juelsPerGas,
- // costWithoutCallback,
- // transmitter,
- // commitment
- // );
- // assertEq(uint(resultCode), uint(FunctionsResponse.FulfillResult.SUBSCRIPTION_BALANCE_INVARIANT_VIOLATION));
- // assertEq(callbackGasCostJuels, 0);
+ // Find the storage slot that the Subscription is on
+ vm.record();
+ s_functionsRouter.getSubscription(s_subscriptionId);
+ (bytes32[] memory reads, ) = vm.accesses(address(s_functionsRouter));
+ // The first read is from '_isExistingSubscription' which checks Subscription.owner on slot 0
+ // Slot 0 is shared with the Subscription.balance
+ uint256 slot = uint256(reads[0]);
+
+ // The request has already been initiated, forcibly lower the subscription's balance by clearing out slot 0
+ uint96 balance = 1;
+ address owner = address(0);
+ bytes32 data = bytes32(abi.encodePacked(balance, owner)); // TODO: make this more accurate
+ vm.store(address(s_functionsRouter), bytes32(uint256(slot)), data);
+
+ uint256 requestToFulfill = 1;
+
+ uint256[] memory requestNumberKeys = new uint256[](1);
+ requestNumberKeys[0] = requestToFulfill;
+
+ string[] memory results = new string[](1);
+ string memory response = "hello world!";
+ results[0] = response;
+
+ bytes[] memory errors = new bytes[](1);
+ bytes memory err = new bytes(0);
+ errors[0] = err;
+
+ // topic0 (function signature, always checked), topic1 (true), NOT topic2 (false), NOT topic3 (false), and data (true).
+ bool checkTopic1RequestId = true;
+ bool checkTopic2 = false;
+ bool checkTopic3 = false;
+ bool checkData = true;
+ vm.expectEmit(checkTopic1RequestId, checkTopic2, checkTopic3, checkData);
+ emit RequestNotProcessed({
+ requestId: s_requests[requestToFulfill].requestId,
+ coordinator: address(s_functionsCoordinator),
+ transmitter: NOP_TRANSMITTER_ADDRESS_1,
+ resultCode: FunctionsResponse.FulfillResult.SUBSCRIPTION_BALANCE_INVARIANT_VIOLATION
+ });
+
+ _reportAndStore(requestNumberKeys, results, errors, NOP_TRANSMITTER_ADDRESS_1, false);
}
function test_Fulfill_RequestNotProcessedCostExceedsCommitment() public {
- // Send as committed Coordinator
- vm.stopPrank();
- vm.startPrank(address(s_functionsCoordinator));
+ // Use higher juelsPerGas than request time
+ // 10x the gas price
+ vm.txGasPrice(TX_GASPRICE_START * 10);
- bytes memory response = bytes("hello world!");
+ uint256 requestToFulfill = 1;
+
+ uint256[] memory requestNumberKeys = new uint256[](1);
+ requestNumberKeys[0] = requestToFulfill;
+
+ string[] memory results = new string[](1);
+ string memory response = "hello world!";
+ results[0] = response;
+
+ bytes[] memory errors = new bytes[](1);
bytes memory err = new bytes(0);
- // Use higher juelsPerGas than request time
- uint96 juelsPerGas = 100000;
- uint96 costWithoutCallback = 1;
- address transmitter = NOP_TRANSMITTER_ADDRESS_1;
- FunctionsResponse.Commitment memory commitment = s_requestCommitment;
+ errors[0] = err;
- // topic0 (function signature, always checked), NOT topic1 (false), NOT topic2 (false), NOT topic3 (false), and data (true).
- bool checkTopic1 = false;
+ // topic0 (function signature, always checked), topic1 (true), NOT topic2 (false), NOT topic3 (false), and data (true).
+ bool checkTopic1RequestId = true;
bool checkTopic2 = false;
bool checkTopic3 = false;
bool checkData = true;
- vm.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData);
+ vm.expectEmit(checkTopic1RequestId, checkTopic2, checkTopic3, checkData);
emit RequestNotProcessed({
- requestId: s_requestCommitment.requestId,
+ requestId: s_requests[requestToFulfill].requestId,
coordinator: address(s_functionsCoordinator),
transmitter: NOP_TRANSMITTER_ADDRESS_1,
resultCode: FunctionsResponse.FulfillResult.COST_EXCEEDS_COMMITMENT
});
- (FunctionsResponse.FulfillResult resultCode, uint96 callbackGasCostJuels) = s_functionsRouter.fulfill(
- response,
- err,
- juelsPerGas,
- costWithoutCallback,
- transmitter,
- commitment
- );
-
- assertEq(uint(resultCode), uint(FunctionsResponse.FulfillResult.COST_EXCEEDS_COMMITMENT));
- assertEq(callbackGasCostJuels, 0);
+ _reportAndStore(requestNumberKeys, results, errors, NOP_TRANSMITTER_ADDRESS_1, false);
}
event RequestProcessed(
@@ -1069,14 +1072,17 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup {
s_functionsRouter.addConsumer(s_subscriptionId, address(s_clientWithFailingCallback));
// Send a minimal request
+ uint256 requestKey = 99;
+
string memory sourceCode = "return 'hello world';";
+ uint32 callbackGasLimit = 5500;
vm.recordLogs();
bytes32 requestId = s_clientWithFailingCallback.sendSimpleRequestWithJavaScript(
sourceCode,
s_subscriptionId,
s_donId,
- 5000
+ callbackGasLimit
);
// Get commitment data from OracleRequest event log
@@ -1085,129 +1091,109 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup {
entries[0].data,
(address, uint64, address, bytes, uint16, bytes32, uint64, FunctionsResponse.Commitment)
);
- s_requestCommitment = _commitment;
- // Send as committed Coordinator
- vm.stopPrank();
- vm.startPrank(address(s_functionsCoordinator));
+ s_requests[requestKey] = Request({
+ requestData: RequestData({
+ sourceCode: sourceCode,
+ secrets: new bytes(0),
+ args: new string[](0),
+ bytesArgs: new bytes[](0),
+ callbackGasLimit: callbackGasLimit
+ }),
+ requestId: requestId,
+ commitment: _commitment
+ });
- bytes memory response = bytes("hello world!");
+ // Fulfill
+ uint256 requestToFulfill = requestKey;
+
+ uint256[] memory requestNumberKeys = new uint256[](1);
+ requestNumberKeys[0] = requestToFulfill;
+
+ string[] memory results = new string[](1);
+ string memory response = "hello world";
+ results[0] = response;
+
+ bytes[] memory errors = new bytes[](1);
bytes memory err = new bytes(0);
- uint96 juelsPerGas = 0;
- uint96 costWithoutCallback = 0;
- address transmitter = NOP_TRANSMITTER_ADDRESS_1;
- FunctionsResponse.Commitment memory commitment = s_requestCommitment;
+ errors[0] = err;
- // topic0 (function signature, always checked), NOT topic1 (false), NOT topic2 (false), NOT topic3 (false), and data (true).
- bool checkTopic1 = false;
+ // topic0 (function signature, always checked), topic1 (true), NOT topic2 (false), NOT topic3 (false), and data (true).
+ bool checkTopic1RequestId = false;
bool checkTopic2 = false;
bool checkTopic3 = false;
bool checkData = true;
- vm.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData);
+ vm.expectEmit(checkTopic1RequestId, checkTopic2, checkTopic3, checkData);
emit RequestProcessed({
requestId: requestId,
subscriptionId: s_subscriptionId,
- totalCostJuels: s_adminFee + costWithoutCallback,
- transmitter: transmitter,
+ totalCostJuels: _getExpectedCost(1379), // gasUsed is manually taken
+ transmitter: NOP_TRANSMITTER_ADDRESS_1,
resultCode: FunctionsResponse.FulfillResult.USER_CALLBACK_ERROR,
- response: response,
+ response: bytes(response),
err: err,
callbackReturnData: vm.parseBytes(
"0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000f61736b656420746f207265766572740000000000000000000000000000000000"
- ) // TODO: build this
+ ) // TODO: build this programatically
});
- (FunctionsResponse.FulfillResult resultCode, uint96 callbackGasCostJuels) = s_functionsRouter.fulfill(
- response,
- err,
- juelsPerGas,
- costWithoutCallback,
- transmitter,
- commitment
- );
-
- assertEq(uint(resultCode), uint(FunctionsResponse.FulfillResult.USER_CALLBACK_ERROR));
- assertEq(callbackGasCostJuels, 0);
+ _reportAndStore(requestNumberKeys, results, errors, NOP_TRANSMITTER_ADDRESS_1, true, 1);
}
function test_Fulfill_SuccessUserCallbackRunsOutOfGas() public {
+ // Send request #2 with no callback gas
string memory sourceCode = "return 'hello world';";
- bytes memory secrets;
+ bytes memory secrets = new bytes(0);
string[] memory args = new string[](0);
bytes[] memory bytesArgs = new bytes[](0);
uint32 callbackGasLimit = 0;
+ _sendAndStoreRequest(2, sourceCode, secrets, args, bytesArgs, callbackGasLimit);
- vm.recordLogs();
- // Send a request with no gas for the callback
- bytes32 requestId = s_functionsClient.sendRequest(
- s_donId,
- sourceCode,
- secrets,
- args,
- bytesArgs,
- s_subscriptionId,
- callbackGasLimit
- );
+ uint256 requestToFulfill = 2;
- // Get commitment data from OracleRequest event log
- Vm.Log[] memory entries = vm.getRecordedLogs();
- (, , , , , , , FunctionsResponse.Commitment memory commitment) = abi.decode(
- entries[0].data,
- (address, uint64, address, bytes, uint16, bytes32, uint64, FunctionsResponse.Commitment)
- );
+ uint256[] memory requestNumberKeys = new uint256[](1);
+ requestNumberKeys[0] = requestToFulfill;
- // Send as committed Coordinator
- vm.stopPrank();
- vm.startPrank(address(s_functionsCoordinator));
+ string[] memory results = new string[](1);
+ string memory response = "hello world!";
+ results[0] = response;
- bytes memory response = bytes("hello world!");
+ bytes[] memory errors = new bytes[](1);
bytes memory err = new bytes(0);
- uint96 juelsPerGas = 0;
- uint96 costWithoutCallback = 0;
- address transmitter = NOP_TRANSMITTER_ADDRESS_1;
+ errors[0] = err;
- // topic0 (function signature, always checked), NOT topic1 (false), NOT topic2 (false), NOT topic3 (false), and data (true).
- vm.expectEmit(false, false, false, true);
+ // topic0 (function signature, always checked), topic1: request ID(true), NOT topic2 (false), NOT topic3 (false), and data (true).
+ vm.expectEmit(true, false, false, true);
emit RequestProcessed({
- requestId: requestId,
+ requestId: s_requests[requestToFulfill].requestId,
subscriptionId: s_subscriptionId,
- totalCostJuels: s_adminFee + costWithoutCallback, // NOTE: tx.gasprice is at 0, so no callback gas used
- transmitter: transmitter,
+ totalCostJuels: _getExpectedCost(137), // gasUsed is manually taken
+ transmitter: NOP_TRANSMITTER_ADDRESS_1,
resultCode: FunctionsResponse.FulfillResult.USER_CALLBACK_ERROR,
- response: response,
+ response: bytes(response),
err: err,
callbackReturnData: new bytes(0)
});
- vm.recordLogs();
-
- (FunctionsResponse.FulfillResult resultCode, uint96 callbackGasCostJuels) = s_functionsRouter.fulfill(
- response,
- err,
- juelsPerGas,
- costWithoutCallback,
- transmitter,
- commitment
- );
-
- assertEq(uint(resultCode), uint(FunctionsResponse.FulfillResult.USER_CALLBACK_ERROR));
- assertEq(callbackGasCostJuels, 0);
+ _reportAndStore(requestNumberKeys, results, errors, NOP_TRANSMITTER_ADDRESS_1, true, 1);
}
function test_Fulfill_SuccessClientNoLongerExists() public {
// Delete the Client contract in the time between request and fulfillment
vm.etch(address(s_functionsClient), new bytes(0));
- // Send as committed Coordinator
- vm.stopPrank();
- vm.startPrank(address(s_functionsCoordinator));
+ uint256 requestToFulfill = 1;
- bytes memory response = bytes("hello world!");
+ uint256[] memory requestNumberKeys = new uint256[](1);
+ requestNumberKeys[0] = requestToFulfill;
+
+ string[] memory results = new string[](1);
+ string memory response = "hello world!";
+ results[0] = response;
+
+ bytes[] memory errors = new bytes[](1);
bytes memory err = new bytes(0);
- uint96 juelsPerGas = 0;
- uint96 costWithoutCallback = 0;
- address transmitter = NOP_TRANSMITTER_ADDRESS_1;
- FunctionsResponse.Commitment memory commitment = s_requestCommitment;
+ errors[0] = err;
// topic0 (function signature, always checked), topic1 (true), topic2 (true), NOT topic3 (false), and data (true).
bool checkTopic1RequestId = true;
@@ -1216,72 +1202,49 @@ contract FunctionsRouter_Fulfill is FunctionsClientRequestSetup {
bool checkData = true;
vm.expectEmit(checkTopic1RequestId, checkTopic2SubscriptionId, checkTopic3, checkData);
emit RequestProcessed({
- requestId: s_requestId,
+ requestId: s_requests[requestToFulfill].requestId,
subscriptionId: s_subscriptionId,
- totalCostJuels: s_adminFee + costWithoutCallback, // NOTE: tx.gasprice is at 0, so no callback gas used
- transmitter: transmitter,
+ totalCostJuels: _getExpectedCost(0), // gasUsed is manually taken
+ transmitter: NOP_TRANSMITTER_ADDRESS_1,
resultCode: FunctionsResponse.FulfillResult.USER_CALLBACK_ERROR,
- response: response,
+ response: bytes(response),
err: err,
callbackReturnData: new bytes(0)
});
- vm.recordLogs();
-
- (FunctionsResponse.FulfillResult resultCode, uint96 callbackGasCostJuels) = s_functionsRouter.fulfill(
- response,
- err,
- juelsPerGas,
- costWithoutCallback,
- transmitter,
- commitment
- );
-
- assertEq(uint(resultCode), uint(FunctionsResponse.FulfillResult.USER_CALLBACK_ERROR));
- assertEq(callbackGasCostJuels, 0);
+ _reportAndStore(requestNumberKeys, results, errors, NOP_TRANSMITTER_ADDRESS_1, true, 1);
}
function test_Fulfill_SuccessFulfilled() public {
- // Send as committed Coordinator
- vm.stopPrank();
- vm.startPrank(address(s_functionsCoordinator));
-
- bytes memory response = bytes("hello world!");
+ // Fulfill request 1
+ uint256 requestToFulfill = 1;
+
+ uint256[] memory requestNumberKeys = new uint256[](1);
+ requestNumberKeys[0] = requestToFulfill;
+ string[] memory results = new string[](1);
+ string memory response = "hello world!";
+ results[0] = response;
+ bytes[] memory errors = new bytes[](1);
bytes memory err = new bytes(0);
- uint96 juelsPerGas = 0;
- uint96 costWithoutCallback = 0;
- address transmitter = NOP_TRANSMITTER_ADDRESS_1;
+ errors[0] = err;
- // topic0 (function signature, always checked), NOT topic1 (false), NOT topic2 (false), NOT topic3 (false), and data (true).
- bool checkTopic1 = false;
+ // topic0 (function signature, always checked), topic1 (true), NOT topic2 (false), NOT topic3 (false), and data (true).
+ bool checkTopic1RequestId = true;
bool checkTopic2 = false;
bool checkTopic3 = false;
bool checkData = true;
- vm.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData);
+ vm.expectEmit(checkTopic1RequestId, checkTopic2, checkTopic3, checkData);
emit RequestProcessed({
- requestId: s_requestId,
+ requestId: s_requests[requestToFulfill].requestId,
subscriptionId: s_subscriptionId,
- totalCostJuels: s_adminFee + costWithoutCallback, // NOTE: tx.gasprice is at 0, so no callback gas used
- transmitter: transmitter,
+ totalCostJuels: _getExpectedCost(5371), // gasUsed is manually taken
+ transmitter: NOP_TRANSMITTER_ADDRESS_1,
resultCode: FunctionsResponse.FulfillResult.FULFILLED,
- response: response,
+ response: bytes(response),
err: err,
callbackReturnData: new bytes(0)
});
-
- vm.recordLogs();
-
- (FunctionsResponse.FulfillResult resultCode, uint96 callbackGasCostJuels) = s_functionsRouter.fulfill(
- response,
- err,
- juelsPerGas,
- costWithoutCallback,
- transmitter,
- s_requestCommitment
- );
-
- assertEq(uint(resultCode), uint(FunctionsResponse.FulfillResult.FULFILLED));
- assertEq(callbackGasCostJuels, 0);
+ _reportAndStore(requestNumberKeys, results, errors);
}
}
@@ -1444,11 +1407,11 @@ contract FunctionsRouter_ProposeContractsUpdate is FunctionsRoutesSetup {
// Generate some mock data
bytes32[] memory proposedContractSetIds = new bytes32[](INVALID_PROPOSAL_SET_LENGTH);
- for (uint8 i = 0; i < INVALID_PROPOSAL_SET_LENGTH; ++i) {
+ for (uint256 i = 0; i < INVALID_PROPOSAL_SET_LENGTH; ++i) {
proposedContractSetIds[i] = bytes32(uint256(i + 111));
}
address[] memory proposedContractSetAddresses = new address[](INVALID_PROPOSAL_SET_LENGTH);
- for (uint8 i = 0; i < INVALID_PROPOSAL_SET_LENGTH; ++i) {
+ for (uint256 i = 0; i < INVALID_PROPOSAL_SET_LENGTH; ++i) {
proposedContractSetAddresses[i] = address(uint160(uint(keccak256(abi.encodePacked(i + 111)))));
}
diff --git a/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsSubscriptions.t.sol b/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsSubscriptions.t.sol
index 26dd7af20f..ea5ec0dd68 100644
--- a/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsSubscriptions.t.sol
+++ b/contracts/src/v0.8/functions/tests/v1_0_0/FunctionsSubscriptions.t.sol
@@ -1205,15 +1205,15 @@ contract FunctionsSubscriptions_TimeoutRequests is FunctionsClientRequestSetup {
vm.expectRevert("Pausable: paused");
FunctionsResponse.Commitment[] memory commitments = new FunctionsResponse.Commitment[](1);
- commitments[0] = s_requestCommitment;
+ commitments[0] = s_requests[1].commitment;
s_functionsRouter.timeoutRequests(commitments);
}
function test_TimeoutRequests_RevertInvalidRequest() public {
// Modify the commitment so that it doesn't match
- s_requestCommitment.donFee = 123456789;
+ s_requests[1].commitment.donFee = 123456789;
FunctionsResponse.Commitment[] memory commitments = new FunctionsResponse.Commitment[](1);
- commitments[0] = s_requestCommitment;
+ commitments[0] = s_requests[1].commitment;
vm.expectRevert(FunctionsSubscriptions.InvalidCalldata.selector);
s_functionsRouter.timeoutRequests(commitments);
}
@@ -1221,7 +1221,7 @@ contract FunctionsSubscriptions_TimeoutRequests is FunctionsClientRequestSetup {
function test_TimeoutRequests_RevertIfTimeoutNotExceeded() public {
vm.expectRevert(FunctionsSubscriptions.TimeoutNotExceeded.selector);
FunctionsResponse.Commitment[] memory commitments = new FunctionsResponse.Commitment[](1);
- commitments[0] = s_requestCommitment;
+ commitments[0] = s_requests[1].commitment;
s_functionsRouter.timeoutRequests(commitments);
}
@@ -1238,13 +1238,13 @@ contract FunctionsSubscriptions_TimeoutRequests is FunctionsClientRequestSetup {
bool checkTopic3 = false;
bool checkData = true;
vm.expectEmit(checkTopic1, checkTopic2, checkTopic3, checkData);
- emit RequestTimedOut(s_requestId);
+ emit RequestTimedOut(s_requests[1].requestId);
// Jump ahead in time past timeout timestamp
- vm.warp(s_requestCommitment.timeoutTimestamp + 1);
+ vm.warp(s_requests[1].commitment.timeoutTimestamp + 1);
FunctionsResponse.Commitment[] memory commitments = new FunctionsResponse.Commitment[](1);
- commitments[0] = s_requestCommitment;
+ commitments[0] = s_requests[1].commitment;
s_functionsRouter.timeoutRequests(commitments);
// Releases blocked balance and increments completed requests
diff --git a/contracts/src/v0.8/functions/tests/v1_0_0/Setup.t.sol b/contracts/src/v0.8/functions/tests/v1_0_0/Setup.t.sol
index 1578834499..73644e3863 100644
--- a/contracts/src/v0.8/functions/tests/v1_0_0/Setup.t.sol
+++ b/contracts/src/v0.8/functions/tests/v1_0_0/Setup.t.sol
@@ -13,6 +13,7 @@ import {MockLinkToken} from "../../../mocks/MockLinkToken.sol";
import "forge-std/Vm.sol";
+/// @notice Set up to deploy the following contracts: FunctionsRouter, FunctionsCoordinator, LINK/ETH Feed, ToS Allow List, and LINK token
contract FunctionsRouterSetup is BaseTest {
FunctionsRouter internal s_functionsRouter;
FunctionsCoordinatorTestHelper internal s_functionsCoordinator; // TODO: use actual FunctionsCoordinator instead of helper
@@ -25,7 +26,7 @@ contract FunctionsRouterSetup is BaseTest {
uint72 internal s_donFee = 100;
bytes4 internal s_handleOracleFulfillmentSelector = 0x0ca76175;
uint16 s_subscriptionDepositMinimumRequests = 1;
- uint72 s_subscriptionDepositJuels = 11 * 1e18;
+ uint72 s_subscriptionDepositJuels = 11 * JUELS_PER_LINK;
int256 internal LINK_ETH_RATE = 6000000000000000;
@@ -67,8 +68,8 @@ contract FunctionsRouterSetup is BaseTest {
return
FunctionsBilling.Config({
feedStalenessSeconds: 24 * 60 * 60, // 1 day
- gasOverheadAfterCallback: 44_615, // TODO: update
- gasOverheadBeforeCallback: 44_615, // TODO: update
+ gasOverheadAfterCallback: 50_000, // TODO: update
+ gasOverheadBeforeCallback: 100_00, // TODO: update
requestTimeoutSeconds: 60 * 5, // 5 minutes
donFee: s_donFee,
maxSupportedRequestDataVersion: 1,
@@ -82,6 +83,7 @@ contract FunctionsRouterSetup is BaseTest {
}
}
+/// @notice Set up to set the OCR configuration of the Coordinator contract
contract FunctionsDONSetup is FunctionsRouterSetup {
uint256 internal NOP_SIGNER_PRIVATE_KEY_1 = 0x100;
address internal NOP_SIGNER_ADDRESS_1 = vm.addr(NOP_SIGNER_PRIVATE_KEY_1);
@@ -101,35 +103,41 @@ contract FunctionsDONSetup is FunctionsRouterSetup {
uint256 internal NOP_TRANSMITTER_PRIVATE_KEY_4 = 0x107;
address internal NOP_TRANSMITTER_ADDRESS_4 = vm.addr(NOP_TRANSMITTER_PRIVATE_KEY_4);
+ address[] internal s_signers;
+ address[] internal s_transmitters;
+ uint8 s_f = 1;
+ bytes internal s_onchainConfig = new bytes(0);
+ uint64 internal s_offchainConfigVersion = 1;
+ bytes internal s_offchainConfig = new bytes(0);
+
function setUp() public virtual override {
FunctionsRouterSetup.setUp();
- address[] memory _signers = new address[](4);
- _signers[0] = NOP_SIGNER_ADDRESS_1;
- _signers[1] = NOP_SIGNER_ADDRESS_2;
- _signers[2] = NOP_SIGNER_ADDRESS_3;
- _signers[3] = NOP_SIGNER_ADDRESS_4;
- address[] memory _transmitters = new address[](4);
- _transmitters[0] = NOP_TRANSMITTER_ADDRESS_1;
- _transmitters[1] = NOP_TRANSMITTER_ADDRESS_2;
- _transmitters[2] = NOP_TRANSMITTER_ADDRESS_3;
- _transmitters[3] = NOP_TRANSMITTER_ADDRESS_4;
- uint8 _f = 1;
- bytes memory _onchainConfig = new bytes(0);
- uint64 _offchainConfigVersion = 1;
- bytes memory _offchainConfig = new bytes(0);
+ s_signers = new address[](4);
+ s_signers[0] = NOP_SIGNER_ADDRESS_1;
+ s_signers[1] = NOP_SIGNER_ADDRESS_2;
+ s_signers[2] = NOP_SIGNER_ADDRESS_3;
+ s_signers[3] = NOP_SIGNER_ADDRESS_4;
+
+ s_transmitters = new address[](4);
+ s_transmitters[0] = NOP_TRANSMITTER_ADDRESS_1;
+ s_transmitters[1] = NOP_TRANSMITTER_ADDRESS_2;
+ s_transmitters[2] = NOP_TRANSMITTER_ADDRESS_3;
+ s_transmitters[3] = NOP_TRANSMITTER_ADDRESS_4;
+
// set OCR config
s_functionsCoordinator.setConfig(
- _signers,
- _transmitters,
- _f,
- _onchainConfig,
- _offchainConfigVersion,
- _offchainConfig
+ s_signers,
+ s_transmitters,
+ s_f,
+ s_onchainConfig,
+ s_offchainConfigVersion,
+ s_offchainConfig
);
}
}
+/// @notice Set up to add the Coordinator and ToS Allow Contract as routes on the Router contract
contract FunctionsRoutesSetup is FunctionsDONSetup {
bytes32 s_donId = bytes32("1");
@@ -149,6 +157,7 @@ contract FunctionsRoutesSetup is FunctionsDONSetup {
}
}
+/// @notice Set up for the OWNER_ADDRESS to accept the Terms of Service
contract FunctionsOwnerAcceptTermsOfServiceSetup is FunctionsRoutesSetup {
function setUp() public virtual override {
FunctionsRoutesSetup.setUp();
@@ -160,6 +169,7 @@ contract FunctionsOwnerAcceptTermsOfServiceSetup is FunctionsRoutesSetup {
}
}
+/// @notice Set up to deploy a consumer contract
contract FunctionsClientSetup is FunctionsOwnerAcceptTermsOfServiceSetup {
FunctionsClientUpgradeHelper internal s_functionsClient;
@@ -170,8 +180,8 @@ contract FunctionsClientSetup is FunctionsOwnerAcceptTermsOfServiceSetup {
}
}
+/// @notice Set up to create a subscription, add the consumer contract as a consumer of the subscription, and fund the subscription with 's_subscriptionInitialFunding'
contract FunctionsSubscriptionSetup is FunctionsClientSetup {
- uint96 constant JUELS_PER_LINK = 1e18;
uint64 s_subscriptionId;
uint96 s_subscriptionInitialFunding = 10 * JUELS_PER_LINK; // 10 LINK
@@ -187,22 +197,68 @@ contract FunctionsSubscriptionSetup is FunctionsClientSetup {
}
}
+/// @notice Set up to initate a minimal request and store it in s_requests[1]
contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup {
- bytes32 s_requestId;
- FunctionsResponse.Commitment s_requestCommitment;
+ struct RequestData {
+ string sourceCode;
+ bytes secrets;
+ string[] args;
+ bytes[] bytesArgs;
+ uint32 callbackGasLimit;
+ }
+ struct Request {
+ RequestData requestData;
+ bytes32 requestId;
+ FunctionsResponse.Commitment commitment;
+ }
+
+ mapping(uint256 => Request) s_requests;
+
+ uint96 s_fulfillmentRouterOwnerBalance = 0;
+ uint96 s_fulfillmentCoordinatorBalance = 0;
function setUp() public virtual override {
FunctionsSubscriptionSetup.setUp();
- // Send a minimal request
+ // Send request #1
string memory sourceCode = "return 'hello world';";
- bytes memory secrets;
+ bytes memory secrets = new bytes(0);
string[] memory args = new string[](0);
bytes[] memory bytesArgs = new bytes[](0);
uint32 callbackGasLimit = 5500;
+ _sendAndStoreRequest(1, sourceCode, secrets, args, bytesArgs, callbackGasLimit);
+ }
+
+ function _getExpectedCost(uint256 gasUsed) internal view returns (uint96 totalCostJuels) {
+ uint96 juelsPerGas = uint96((1e18 * TX_GASPRICE_START) / uint256(LINK_ETH_RATE));
+ uint96 gasOverheadJuels = juelsPerGas *
+ (getCoordinatorConfig().gasOverheadBeforeCallback + getCoordinatorConfig().gasOverheadAfterCallback);
+ uint96 callbackGasCostJuels = uint96(juelsPerGas * gasUsed);
+ return gasOverheadJuels + s_donFee + s_adminFee + callbackGasCostJuels;
+ }
+
+ /// @notice Send a request and store information about it in s_requests
+ /// @param requestNumberKey - the key that the request will be stored in `s_requests` in
+ /// @param sourceCode - Raw source code for Request.codeLocation of Location.Inline, URL for Request.codeLocation of Location.Remote, or slot decimal number for Request.codeLocation of Location.DONHosted
+ /// @param secrets - Encrypted URLs for Request.secretsLocation of Location.Remote (use addSecretsReference()), or CBOR encoded slotid+version for Request.secretsLocation of Location.DONHosted (use addDONHostedSecrets())
+ /// @param args - String arguments that will be passed into the source code
+ /// @param bytesArgs - Bytes arguments that will be passed into the source code
+ /// @param callbackGasLimit - Gas limit for the fulfillment callback
+ function _sendAndStoreRequest(
+ uint256 requestNumberKey,
+ string memory sourceCode,
+ bytes memory secrets,
+ string[] memory args,
+ bytes[] memory bytesArgs,
+ uint32 callbackGasLimit
+ ) internal {
+ if (s_requests[requestNumberKey].requestId != bytes32(0)) {
+ revert("Request already written");
+ }
vm.recordLogs();
- s_requestId = s_functionsClient.sendRequest(
+
+ bytes32 requestId = s_functionsClient.sendRequest(
s_donId,
sourceCode,
secrets,
@@ -218,184 +274,288 @@ contract FunctionsClientRequestSetup is FunctionsSubscriptionSetup {
entries[0].data,
(address, uint64, address, bytes, uint16, bytes32, uint64, FunctionsResponse.Commitment)
);
- s_requestCommitment = commitment;
+ s_requests[requestNumberKey] = Request({
+ requestData: RequestData({
+ sourceCode: sourceCode,
+ secrets: secrets,
+ args: args,
+ bytesArgs: bytesArgs,
+ callbackGasLimit: callbackGasLimit
+ }),
+ requestId: requestId,
+ commitment: commitment
+ });
}
-}
-
-contract FunctionsFulfillmentSetup is FunctionsClientRequestSetup {
- uint96 s_fulfillmentRouterOwnerBalance = s_adminFee;
- uint96 s_fulfillmentCoordinatorBalance;
-
- function setUp() public virtual override {
- FunctionsClientRequestSetup.setUp();
-
- // Send as transmitter 1
- vm.stopPrank();
- vm.startPrank(NOP_TRANSMITTER_ADDRESS_1);
+ /// @notice Send a request and store information about it in s_requests
+ /// @param requestNumberKeys - One or more requestNumberKeys that were used to store the request in `s_requests` of the requests, that will be added to the report
+ /// @param results - The result that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @param errors - The error that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @return report - Report bytes data
+ /// @return reportContext - Report context bytes32 data
+ function _buildReport(
+ uint256[] memory requestNumberKeys,
+ string[] memory results,
+ bytes[] memory errors
+ ) internal view returns (bytes memory report, bytes32[3] memory reportContext) {
// Build report
- bytes32[] memory requestIds = new bytes32[](1);
- requestIds[0] = s_requestId;
- bytes[] memory results = new bytes[](1);
- results[0] = bytes("hello world!");
- bytes[] memory errors = new bytes[](1);
- // No error
- bytes[] memory onchainMetadata = new bytes[](1);
- onchainMetadata[0] = abi.encode(s_requestCommitment);
- bytes[] memory offchainMetadata = new bytes[](1);
- // No offchain metadata
- bytes memory report = abi.encode(requestIds, results, errors, onchainMetadata, offchainMetadata);
-
- // Build signers
- address[31] memory signers;
- signers[0] = NOP_SIGNER_ADDRESS_1;
-
- // Send report
- vm.recordLogs();
- s_functionsCoordinator.callReportWithSigners(report, signers);
-
- // Get actual cost from RequestProcessed event log
- Vm.Log[] memory entries = vm.getRecordedLogs();
- (uint96 totalCostJuels, , , , , ) = abi.decode(
- entries[2].data,
- (uint96, address, FunctionsResponse.FulfillResult, bytes, bytes, bytes)
+ bytes32[] memory _requestIds = new bytes32[](requestNumberKeys.length);
+ bytes[] memory _results = new bytes[](requestNumberKeys.length);
+ bytes[] memory _errors = new bytes[](requestNumberKeys.length);
+ bytes[] memory _onchainMetadata = new bytes[](requestNumberKeys.length);
+ bytes[] memory _offchainMetadata = new bytes[](requestNumberKeys.length);
+ for (uint256 i = 0; i < requestNumberKeys.length; ++i) {
+ if (keccak256(bytes(results[i])) != keccak256(new bytes(0)) && keccak256(errors[i]) != keccak256(new bytes(0))) {
+ revert("Report can only contain a result OR an error, one must remain empty.");
+ }
+ _requestIds[i] = s_requests[requestNumberKeys[i]].requestId;
+ _results[i] = bytes(results[i]);
+ _errors[i] = errors[i];
+ _onchainMetadata[i] = abi.encode(s_requests[requestNumberKeys[i]].commitment);
+ _offchainMetadata[i] = new bytes(0); // No off-chain metadata
+ }
+ report = abi.encode(_requestIds, _results, _errors, _onchainMetadata, _offchainMetadata);
+
+ // Build report context
+ uint256 h = uint256(
+ keccak256(
+ abi.encode(
+ block.chainid,
+ address(s_functionsCoordinator),
+ 1,
+ s_signers,
+ s_transmitters,
+ s_f,
+ s_onchainConfig,
+ s_offchainConfigVersion,
+ s_offchainConfig
+ )
+ )
);
- // totalCostJuels = costWithoutCallbackJuels + adminFee + callbackGasCostJuels
- s_fulfillmentCoordinatorBalance = totalCostJuels - s_adminFee;
+ uint256 prefixMask = type(uint256).max << (256 - 16); // 0xFFFF00..00
+ uint256 prefix = 0x0001 << (256 - 16); // 0x000100..00
+ bytes32 configDigest = bytes32((prefix & prefixMask) | (h & ~prefixMask));
+ reportContext = [configDigest, configDigest, configDigest];
- // Return prank to Owner
- vm.stopPrank();
- vm.startPrank(OWNER_ADDRESS);
+ return (report, reportContext);
}
-}
-
-contract FunctionsMultipleFulfillmentsSetup is FunctionsFulfillmentSetup {
- bytes32 s_requestId2;
- FunctionsResponse.Commitment s_requestCommitment2;
- bytes32 s_requestId3;
- FunctionsResponse.Commitment s_requestCommitment3;
-
- function setUp() public virtual override {
- FunctionsFulfillmentSetup.setUp();
- // Make 2 additional requests (1 already complete)
-
- // *** Request #2 ***
- vm.recordLogs();
- s_requestId2 = s_functionsClient.sendRequest(
- s_donId,
- "return 'hello world';",
- new bytes(0),
- new string[](0),
- new bytes[](0),
- s_subscriptionId,
- 5500
- );
+ /// @notice Gather signatures on report data
+ /// @param report - Report bytes generated from `_buildReport`
+ /// @param reportContext - Report context bytes32 generated from `_buildReport`
+ /// @param signerPrivateKeys - One or more addresses that will sign the report data
+ /// @return rawRs - Signature rs
+ /// @return rawSs - Signature ss
+ /// @return rawVs - Signature vs
+ function _signReport(
+ bytes memory report,
+ bytes32[3] memory reportContext,
+ uint256[] memory signerPrivateKeys
+ ) internal pure returns (bytes32[] memory rawRs, bytes32[] memory rawSs, bytes32 rawVs) {
+ bytes32[] memory rs = new bytes32[](signerPrivateKeys.length);
+ bytes32[] memory ss = new bytes32[](signerPrivateKeys.length);
+ bytes memory vs = new bytes(signerPrivateKeys.length);
+
+ bytes32 reportDigest = keccak256(abi.encodePacked(keccak256(report), reportContext));
+
+ for (uint256 i = 0; i < signerPrivateKeys.length; i++) {
+ (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPrivateKeys[i], reportDigest);
+ rs[i] = r;
+ ss[i] = s;
+ vs[i] = bytes1(v - 27);
+ }
+
+ return (rs, ss, bytes32(vs));
+ }
- // Get commitment data from OracleRequest event log
- Vm.Log[] memory entriesAfterRequest2 = vm.getRecordedLogs();
- (, , , , , , , FunctionsResponse.Commitment memory commitment2) = abi.decode(
- entriesAfterRequest2[0].data,
- (address, uint64, address, bytes, uint16, bytes32, uint64, FunctionsResponse.Commitment)
+ /// @notice Provide a response from the DON to fulfill one or more requests and store the updated balances of the DON & Admin
+ /// @param requestNumberKeys - One or more requestNumberKeys that were used to store the request in `s_requests` of the requests, that will be added to the report
+ /// @param results - The result that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @param errors - The error that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @param transmitter - The address that will send the `.report` transaction
+ /// @param expectedToSucceed - Boolean representing if the report transmission is expected to produce a RequestProcessed event for every fulfillment. If not, we ignore retrieving the event log.
+ /// @param requestProcessedIndex - On a successful fulfillment the Router will emit a RequestProcessed event. To grab that event we must know the order at which this event was thrown in the report transmission lifecycle. This can change depending on the test setup (e.g. the Client contract gives an extra event during its callback)
+ /// @param transmitterGasToUse - Override the default amount of gas that the transmitter sends the `.report` transaction with
+ function _reportAndStore(
+ uint256[] memory requestNumberKeys,
+ string[] memory results,
+ bytes[] memory errors,
+ address transmitter,
+ bool expectedToSucceed,
+ uint8 requestProcessedIndex,
+ uint256 transmitterGasToUse
+ ) internal {
+ {
+ if (requestNumberKeys.length != results.length || requestNumberKeys.length != errors.length) {
+ revert("_reportAndStore arguments length mismatch");
+ }
+ }
+
+ (bytes memory report, bytes32[3] memory reportContext) = _buildReport(requestNumberKeys, results, errors);
+
+ // Sign the report
+ // Need at least 3 signers to fulfill minimum number of: (configInfo.n + configInfo.f) / 2 + 1
+ uint256[] memory signerPrivateKeys = new uint256[](3);
+ signerPrivateKeys[0] = NOP_SIGNER_PRIVATE_KEY_1;
+ signerPrivateKeys[1] = NOP_SIGNER_PRIVATE_KEY_2;
+ signerPrivateKeys[2] = NOP_SIGNER_PRIVATE_KEY_3;
+ (bytes32[] memory rawRs, bytes32[] memory rawSs, bytes32 rawVs) = _signReport(
+ report,
+ reportContext,
+ signerPrivateKeys
);
- s_requestCommitment2 = commitment2;
- // Transmit as transmitter 2
+ // Send as transmitter
vm.stopPrank();
- vm.startPrank(NOP_TRANSMITTER_ADDRESS_2);
-
- // Build report
- bytes32[] memory requestIds2 = new bytes32[](1);
- requestIds2[0] = s_requestId2;
- bytes[] memory results2 = new bytes[](1);
- results2[0] = bytes("hello world!");
- bytes[] memory errors2 = new bytes[](1);
- // No error
- bytes[] memory onchainMetadata2 = new bytes[](1);
- onchainMetadata2[0] = abi.encode(s_requestCommitment2);
- bytes[] memory offchainMetadata2 = new bytes[](1);
- // No offchain metadata
- bytes memory report2 = abi.encode(requestIds2, results2, errors2, onchainMetadata2, offchainMetadata2);
-
- // Build signers
- address[31] memory signers2;
- signers2[0] = NOP_SIGNER_ADDRESS_2;
+ vm.startPrank(transmitter);
// Send report
vm.recordLogs();
- s_functionsCoordinator.callReportWithSigners(report2, signers2);
-
- // Get actual cost from RequestProcessed event log
- Vm.Log[] memory entriesAfterFulfill2 = vm.getRecordedLogs();
- (uint96 totalCostJuels2, , , , , ) = abi.decode(
- entriesAfterFulfill2[2].data,
- (uint96, address, FunctionsResponse.FulfillResult, bytes, bytes, bytes)
- );
- // totalCostJuels = costWithoutCallbackJuels + adminFee + callbackGasCostJuels
- s_fulfillmentCoordinatorBalance += totalCostJuels2 - s_adminFee;
- s_fulfillmentRouterOwnerBalance += s_adminFee;
+ if (transmitterGasToUse > 0) {
+ s_functionsCoordinator.transmit{gas: transmitterGasToUse}(reportContext, report, rawRs, rawSs, rawVs);
+ } else {
+ s_functionsCoordinator.transmit(reportContext, report, rawRs, rawSs, rawVs);
+ }
+
+ if (expectedToSucceed) {
+ // Get actual cost from RequestProcessed event log
+ (uint96 totalCostJuels, , , , , ) = abi.decode(
+ vm.getRecordedLogs()[requestProcessedIndex].data,
+ (uint96, address, FunctionsResponse.FulfillResult, bytes, bytes, bytes)
+ );
+ // Store profit amounts
+ s_fulfillmentRouterOwnerBalance += s_adminFee;
+ // totalCostJuels = costWithoutCallbackJuels + adminFee + callbackGasCostJuels
+ s_fulfillmentCoordinatorBalance += totalCostJuels - s_adminFee;
+ }
// Return prank to Owner
vm.stopPrank();
vm.startPrank(OWNER_ADDRESS);
+ }
- // *** Request #3 ***
- vm.recordLogs();
- s_requestId3 = s_functionsClient.sendRequest(
- s_donId,
- "return 'hello world';",
- new bytes(0),
- new string[](0),
- new bytes[](0),
- s_subscriptionId,
- 5500
- );
+ /// @notice Provide a response from the DON to fulfill one or more requests and store the updated balances of the DON & Admin
+ /// @param requestNumberKeys - One or more requestNumberKeys that were used to store the request in `s_requests` of the requests, that will be added to the report
+ /// @param results - The result that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @param errors - The error that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @param transmitter - The address that will send the `.report` transaction
+ /// @param expectedToSucceed - Boolean representing if the report transmission is expected to produce a RequestProcessed event for every fulfillment. If not, we ignore retrieving the event log.
+ /// @param requestProcessedIndex - On a successful fulfillment the Router will emit a RequestProcessed event. To grab that event we must know the order at which this event was thrown in the report transmission lifecycle. This can change depending on the test setup (e.g. the Client contract gives an extra event during its callback)
+ /// @dev @param transmitterGasToUse is overloaded to give transmitterGasToUse as 0] - Sends the `.report` transaction with the default amount of gas
+ function _reportAndStore(
+ uint256[] memory requestNumberKeys,
+ string[] memory results,
+ bytes[] memory errors,
+ address transmitter,
+ bool expectedToSucceed,
+ uint8 requestProcessedIndex
+ ) internal {
+ _reportAndStore(requestNumberKeys, results, errors, transmitter, expectedToSucceed, requestProcessedIndex, 0);
+ }
- // Get commitment data from OracleRequest event log
- Vm.Log[] memory entriesAfterRequest3 = vm.getRecordedLogs();
- (, , , , , , , FunctionsResponse.Commitment memory commitment3) = abi.decode(
- entriesAfterRequest3[0].data,
- (address, uint64, address, bytes, uint16, bytes32, uint64, FunctionsResponse.Commitment)
- );
- s_requestCommitment3 = commitment3;
+ /// @notice Provide a response from the DON to fulfill one or more requests and store the updated balances of the DON & Admin
+ /// @param requestNumberKeys - One or more requestNumberKeys that were used to store the request in `s_requests` of the requests, that will be added to the report
+ /// @param results - The result that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @param errors - The error that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @param transmitter - The address that will send the `.report` transaction
+ /// @param expectedToSucceed - Boolean representing if the report transmission is expected to produce a RequestProcessed event for every fulfillment. If not, we ignore retrieving the event log.
+ /// @dev @param requestProcessedIndex is overloaded to give requestProcessedIndex as 3 (happy path value)] - On a successful fulfillment the Router will emit a RequestProcessed event. To grab that event we must know the order at which this event was thrown in the report transmission lifecycle. This can change depending on the test setup (e.g. the Client contract gives an extra event during its callback)
+ /// @dev @param transmitterGasToUse is overloaded to give transmitterGasToUse as 0] - Sends the `.report` transaction with the default amount of gas
+ function _reportAndStore(
+ uint256[] memory requestNumberKeys,
+ string[] memory results,
+ bytes[] memory errors,
+ address transmitter,
+ bool expectedToSucceed
+ ) internal {
+ _reportAndStore(requestNumberKeys, results, errors, transmitter, expectedToSucceed, 3);
+ }
- // Transmit as transmitter 3
- vm.stopPrank();
- vm.startPrank(NOP_TRANSMITTER_ADDRESS_3);
+ /// @notice Provide a response from the DON to fulfill one or more requests and store the updated balances of the DON & Admin
+ /// @param requestNumberKeys - One or more requestNumberKeys that were used to store the request in `s_requests` of the requests, that will be added to the report
+ /// @param results - The result that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @param errors - The error that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @param transmitter - The address that will send the `.report` transaction
+ /// @dev @param expectedToSucceed is overloaded to give the value as true - The report transmission is expected to produce a RequestProcessed event for every fulfillment
+ /// @dev @param requestProcessedIndex is overloaded to give requestProcessedIndex as 3 (happy path value)] - On a successful fulfillment the Router will emit a RequestProcessed event. To grab that event we must know the order at which this event was thrown in the report transmission lifecycle. This can change depending on the test setup (e.g. the Client contract gives an extra event during its callback)
+ /// @dev @param transmitterGasToUse is overloaded to give transmitterGasToUse as 0] - Sends the `.report` transaction with the default amount of gas
+ function _reportAndStore(
+ uint256[] memory requestNumberKeys,
+ string[] memory results,
+ bytes[] memory errors,
+ address transmitter
+ ) internal {
+ _reportAndStore(requestNumberKeys, results, errors, transmitter, true);
+ }
- // Build report
- bytes32[] memory requestIds3 = new bytes32[](1);
- requestIds3[0] = s_requestId3;
- bytes[] memory results3 = new bytes[](1);
- results3[0] = bytes("hello world!");
- bytes[] memory errors3 = new bytes[](1);
- // No error
- bytes[] memory onchainMetadata3 = new bytes[](1);
- onchainMetadata3[0] = abi.encode(s_requestCommitment3);
- bytes[] memory offchainMetadata3 = new bytes[](1);
- // No offchain metadata
- bytes memory report3 = abi.encode(requestIds3, results3, errors3, onchainMetadata3, offchainMetadata3);
-
- // Build signers
- address[31] memory signers3;
- signers3[0] = NOP_SIGNER_ADDRESS_3;
+ /// @notice Provide a response from the DON to fulfill one or more requests and store the updated balances of the DON & Admin
+ /// @param requestNumberKeys - One or more requestNumberKeys that were used to store the request in `s_requests` of the requests, that will be added to the report
+ /// @param results - The result that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @param errors - The error that will be sent to the consumer contract's callback. For each index, e.g. result[index] or errors[index], only one of should be filled.
+ /// @dev @param transmitter is overloaded to give the value of transmitter #1 - The address that will send the `.report` transaction
+ /// @dev @param expectedToSucceed is overloaded to give the value as true - The report transmission is expected to produce a RequestProcessed event for every fulfillment
+ /// @dev @param requestProcessedIndex is overloaded to give requestProcessedIndex as 3 (happy path value)] - On a successful fulfillment the Router will emit a RequestProcessed event. To grab that event we must know the order at which this event was thrown in the report transmission lifecycle. This can change depending on the test setup (e.g. the Client contract gives an extra event during its callback)
+ /// @dev @param transmitterGasToUse is overloaded to give transmitterGasToUse as 0] - Sends the `.report` transaction with the default amount of gas
+ function _reportAndStore(
+ uint256[] memory requestNumberKeys,
+ string[] memory results,
+ bytes[] memory errors
+ ) internal {
+ _reportAndStore(requestNumberKeys, results, errors, NOP_TRANSMITTER_ADDRESS_1);
+ }
+}
- // Send report
- vm.recordLogs();
- s_functionsCoordinator.callReportWithSigners(report3, signers3);
+/// @notice Set up to have transmitter #1 send a report that fulfills request #1
+contract FunctionsFulfillmentSetup is FunctionsClientRequestSetup {
+ function setUp() public virtual override {
+ FunctionsClientRequestSetup.setUp();
- // Get actual cost from RequestProcessed event log
- Vm.Log[] memory entriesAfterFulfill3 = vm.getRecordedLogs();
- (uint96 totalCostJuels3, , , , , ) = abi.decode(
- entriesAfterFulfill3[2].data,
- (uint96, address, FunctionsResponse.FulfillResult, bytes, bytes, bytes)
- );
+ // Fulfill request 1
+ uint256[] memory requestNumberKeys = new uint256[](1);
+ requestNumberKeys[0] = 1;
+ string[] memory results = new string[](1);
+ results[0] = "hello world!";
+ bytes[] memory errors = new bytes[](1);
+ errors[0] = new bytes(0);
- // totalCostJuels = costWithoutCallbackJuels + adminFee + callbackGasCostJuels
- s_fulfillmentCoordinatorBalance += totalCostJuels3 - s_adminFee;
+ _reportAndStore(requestNumberKeys, results, errors, NOP_TRANSMITTER_ADDRESS_1, true);
+ }
+}
- // Return prank to Owner
- vm.stopPrank();
- vm.startPrank(OWNER_ADDRESS);
+/// @notice Set up to send and fulfill two more requests, s_request[2] reported by transmitter #2 and s_request[3] reported by transmitter #3
+contract FunctionsMultipleFulfillmentsSetup is FunctionsFulfillmentSetup {
+ function setUp() public virtual override {
+ FunctionsFulfillmentSetup.setUp();
+
+ // Make 2 additional requests (1 already complete)
+
+ // *** Request #2 ***
+ // Send
+ string memory sourceCode = "return 'hello world';";
+ bytes memory secrets = new bytes(0);
+ string[] memory args = new string[](0);
+ bytes[] memory bytesArgs = new bytes[](0);
+ uint32 callbackGasLimit = 5500;
+ _sendAndStoreRequest(2, sourceCode, secrets, args, bytesArgs, callbackGasLimit);
+ // Fulfill as transmitter #2
+ uint256[] memory requestNumberKeys1 = new uint256[](1);
+ requestNumberKeys1[0] = 2;
+ string[] memory results1 = new string[](1);
+ results1[0] = "hello world!";
+ bytes[] memory errors1 = new bytes[](1);
+ errors1[0] = new bytes(0);
+ _reportAndStore(requestNumberKeys1, results1, errors1, NOP_TRANSMITTER_ADDRESS_2, true);
+
+ // *** Request #3 ***
+ // Send
+ _sendAndStoreRequest(3, sourceCode, secrets, args, bytesArgs, callbackGasLimit);
+ // Fulfill as transmitter #3
+ uint256[] memory requestNumberKeys2 = new uint256[](1);
+ requestNumberKeys2[0] = 3;
+ string[] memory results2 = new string[](1);
+ results2[0] = "hello world!";
+ bytes[] memory errors2 = new bytes[](1);
+ errors2[0] = new bytes(0);
+ _reportAndStore(requestNumberKeys2, results2, errors2, NOP_TRANSMITTER_ADDRESS_3, true);
}
}
From d4e9b28e102fcf100c8ea8e3aecf7424b9b4e331 Mon Sep 17 00:00:00 2001
From: Jordan Krage
Date: Mon, 18 Sep 2023 15:14:31 -0500
Subject: [PATCH 13/31] core/services: health Checker cleanup (#10670)
* core/services: health Checker cleanup
* plugins: simplify server.MustRegister
---
core/services/chainlink/application.go | 35 ++++++++------------------
core/services/checkable.go | 2 ++
core/services/health.go | 7 +++---
core/services/health_test.go | 7 +++---
core/services/mocks/checker.go | 10 ++++----
core/services/service.go | 3 ---
plugins/cmd/chainlink-median/main.go | 2 +-
plugins/cmd/chainlink-solana/main.go | 2 +-
plugins/cmd/chainlink-starknet/main.go | 2 +-
plugins/server.go | 7 +++---
10 files changed, 31 insertions(+), 46 deletions(-)
diff --git a/core/services/chainlink/application.go b/core/services/chainlink/application.go
index 9d74113050..89070cbf96 100644
--- a/core/services/chainlink/application.go
+++ b/core/services/chainlink/application.go
@@ -178,7 +178,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) {
restrictedHTTPClient := opts.RestrictedHTTPClient
unrestrictedHTTPClient := opts.UnrestrictedHTTPClient
- // LOOPs can be be created as options, in the case of LOOP relayers, or
+ // LOOPs can be created as options, in the case of LOOP relayers, or
// as OCR2 job implementations, in the case of Median today.
// We will have a non-nil registry here in LOOP relayers are being used, otherwise
// we need to initialize in case we serve OCR2 LOOPs
@@ -217,8 +217,6 @@ func NewApplication(opts ApplicationOpts) (Application, error) {
globalLogger.Info("Nurse service (automatic pprof profiling) is disabled")
}
- healthChecker := services.NewChecker()
-
telemetryIngressClient := synchronization.TelemetryIngressClient(&synchronization.NoopTelemetryIngressClient{})
telemetryIngressBatchClient := synchronization.TelemetryIngressBatchClient(&synchronization.NoopTelemetryIngressBatchClient{})
monitoringEndpointGen := telemetry.MonitoringEndpointGenerator(&telemetry.NoopAgent{})
@@ -443,7 +441,14 @@ func NewApplication(opts ApplicationOpts) (Application, error) {
feedsService = &feeds.NullService{}
}
- app := &ChainlinkApplication{
+ healthChecker := services.NewChecker()
+ for _, s := range srvcs {
+ if err := healthChecker.Register(s); err != nil {
+ return nil, err
+ }
+ }
+
+ return &ChainlinkApplication{
relayers: opts.RelayerChainInteroperators,
EventBroadcaster: eventBroadcaster,
jobORM: jobORM,
@@ -472,27 +477,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) {
// NOTE: Can keep things clean by putting more things in srvcs instead of manually start/closing
srvcs: srvcs,
- }
-
- for _, service := range app.srvcs {
- checkable := service.(services.Checkable)
- if err := app.HealthChecker.Register(service.Name(), checkable); err != nil {
- return nil, err
- }
- }
-
- // To avoid subscribing chain services twice, we only subscribe them if OCR2 is not enabled.
- // If it's enabled, they are going to be registered with relayers by default.
- if !cfg.OCR2().Enabled() {
- for _, service := range app.relayers.Services() {
- checkable := service.(services.Checkable)
- if err := app.HealthChecker.Register(service.Name(), checkable); err != nil {
- return nil, err
- }
- }
- }
-
- return app, nil
+ }, nil
}
func (app *ChainlinkApplication) SetLogLevel(lvl zapcore.Level) error {
diff --git a/core/services/checkable.go b/core/services/checkable.go
index 298e3dda47..a702f9f979 100644
--- a/core/services/checkable.go
+++ b/core/services/checkable.go
@@ -10,4 +10,6 @@ type Checkable interface {
// HealthReport returns a full health report of the callee including it's dependencies.
// key is the dep name, value is nil if healthy, or error message otherwise.
HealthReport() map[string]error
+ // Name returns the fully qualified name of the component. Usually the logger name.
+ Name() string
}
diff --git a/core/services/health.go b/core/services/health.go
index da3a99b34d..1912a49b75 100644
--- a/core/services/health.go
+++ b/core/services/health.go
@@ -21,7 +21,7 @@ type (
// Checker provides a service which can be probed for system health.
Checker interface {
// Register a service for health checks.
- Register(name string, service Checkable) error
+ Register(service Checkable) error
// Unregister a service.
Unregister(name string) error
// IsReady returns the current readiness of the system.
@@ -176,8 +176,9 @@ func (c *checker) update() {
uptimeSeconds.Add(interval.Seconds())
}
-func (c *checker) Register(name string, service Checkable) error {
- if service == nil || name == "" {
+func (c *checker) Register(service Checkable) error {
+ name := service.Name()
+ if name == "" {
return errors.Errorf("misconfigured check %#v for %v", name, service)
}
diff --git a/core/services/health_test.go b/core/services/health_test.go
index 295eb86119..f8e139af15 100644
--- a/core/services/health_test.go
+++ b/core/services/health_test.go
@@ -1,7 +1,6 @@
package services_test
import (
- "fmt"
"net/http"
"testing"
"time"
@@ -22,6 +21,8 @@ type boolCheck struct {
healthy bool
}
+func (b boolCheck) Name() string { return b.name }
+
func (b boolCheck) Ready() error {
if b.healthy {
return nil
@@ -57,8 +58,8 @@ func TestCheck(t *testing.T) {
}},
} {
c := services.NewChecker()
- for i, check := range test.checks {
- require.NoError(t, c.Register(fmt.Sprint(i), check))
+ for _, check := range test.checks {
+ require.NoError(t, c.Register(check))
}
require.NoError(t, c.Start())
diff --git a/core/services/mocks/checker.go b/core/services/mocks/checker.go
index cfccc2537f..8a6541bba3 100644
--- a/core/services/mocks/checker.go
+++ b/core/services/mocks/checker.go
@@ -78,13 +78,13 @@ func (_m *Checker) IsReady() (bool, map[string]error) {
return r0, r1
}
-// Register provides a mock function with given fields: name, service
-func (_m *Checker) Register(name string, service services.Checkable) error {
- ret := _m.Called(name, service)
+// Register provides a mock function with given fields: service
+func (_m *Checker) Register(service services.Checkable) error {
+ ret := _m.Called(service)
var r0 error
- if rf, ok := ret.Get(0).(func(string, services.Checkable) error); ok {
- r0 = rf(name, service)
+ if rf, ok := ret.Get(0).(func(services.Checkable) error); ok {
+ r0 = rf(service)
} else {
r0 = ret.Error(0)
}
diff --git a/core/services/service.go b/core/services/service.go
index b3c1bf3677..5bf61e062d 100644
--- a/core/services/service.go
+++ b/core/services/service.go
@@ -81,8 +81,5 @@ type ServiceCtx interface {
// again, you need to build a new Service to do so.
Close() error
- // Name returns the fully qualified name of the service
- Name() string
-
Checkable
}
diff --git a/plugins/cmd/chainlink-median/main.go b/plugins/cmd/chainlink-median/main.go
index aac68eb500..4d96654852 100644
--- a/plugins/cmd/chainlink-median/main.go
+++ b/plugins/cmd/chainlink-median/main.go
@@ -20,7 +20,7 @@ func main() {
p := median.NewPlugin(s.Logger)
defer s.Logger.ErrorIfFn(p.Close, "Failed to close")
- s.MustRegister(p.Name(), p)
+ s.MustRegister(p)
stop := make(chan struct{})
defer close(stop)
diff --git a/plugins/cmd/chainlink-solana/main.go b/plugins/cmd/chainlink-solana/main.go
index df2824fb33..132d7244fd 100644
--- a/plugins/cmd/chainlink-solana/main.go
+++ b/plugins/cmd/chainlink-solana/main.go
@@ -27,7 +27,7 @@ func main() {
p := &pluginRelayer{Base: plugins.Base{Logger: s.Logger}}
defer s.Logger.ErrorIfFn(p.Close, "Failed to close")
- s.MustRegister(p.Name(), p)
+ s.MustRegister(p)
stopCh := make(chan struct{})
defer close(stopCh)
diff --git a/plugins/cmd/chainlink-starknet/main.go b/plugins/cmd/chainlink-starknet/main.go
index 5015f70be2..aa69c85fe4 100644
--- a/plugins/cmd/chainlink-starknet/main.go
+++ b/plugins/cmd/chainlink-starknet/main.go
@@ -27,7 +27,7 @@ func main() {
p := &pluginRelayer{Base: plugins.Base{Logger: s.Logger}}
defer s.Logger.ErrorIfFn(p.Close, "Failed to close")
- s.MustRegister(p.Name(), p)
+ s.MustRegister(p)
stopCh := make(chan struct{})
defer close(stopCh)
diff --git a/plugins/server.go b/plugins/server.go
index 2c1bffb85b..0d0e0dc62c 100644
--- a/plugins/server.go
+++ b/plugins/server.go
@@ -53,10 +53,9 @@ type Server struct {
}
// MustRegister registers the Checkable with services.Checker, or exits upon failure.
-func (s *Server) MustRegister(name string, c services.Checkable) {
- err := s.Register(name, c)
- if err != nil {
- s.Logger.Fatalf("Failed to register %s with health checker: %v", name, err)
+func (s *Server) MustRegister(c services.Checkable) {
+ if err := s.Register(c); err != nil {
+ s.Logger.Fatalf("Failed to register %s with health checker: %v", c.Name(), err)
}
}
From 73966ef5dd383aca7e97747d75f6c58a20f84cce Mon Sep 17 00:00:00 2001
From: Jordan Krage
Date: Mon, 18 Sep 2023 16:29:48 -0500
Subject: [PATCH 14/31] core/services/chainlink: log warn instead of error if
CSA key not available for feeds service (#10543)
---
core/services/chainlink/application.go | 42 ++++++++++++++------------
1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/core/services/chainlink/application.go b/core/services/chainlink/application.go
index 89070cbf96..ba8e242ea8 100644
--- a/core/services/chainlink/application.go
+++ b/core/services/chainlink/application.go
@@ -419,26 +419,30 @@ func NewApplication(opts ApplicationOpts) (Application, error) {
}
}
- var feedsService feeds.Service
+ var feedsService feeds.Service = &feeds.NullService{}
if cfg.Feature().FeedsManager() {
- feedsORM := feeds.NewORM(db, opts.Logger, cfg.Database())
- feedsService = feeds.NewService(
- feedsORM,
- jobORM,
- db,
- jobSpawner,
- keyStore,
- cfg.Insecure(),
- cfg.JobPipeline(),
- cfg.OCR(),
- cfg.OCR2(),
- cfg.Database(),
- legacyEVMChains,
- globalLogger,
- opts.Version,
- )
- } else {
- feedsService = &feeds.NullService{}
+ if keys, err := opts.KeyStore.CSA().GetAll(); err != nil {
+ globalLogger.Warn("[Feeds Service] Unable to start without CSA key", "err", err)
+ } else if len(keys) == 0 {
+ globalLogger.Warn("[Feeds Service] Unable to start without CSA key")
+ } else {
+ feedsORM := feeds.NewORM(db, opts.Logger, cfg.Database())
+ feedsService = feeds.NewService(
+ feedsORM,
+ jobORM,
+ db,
+ jobSpawner,
+ keyStore,
+ cfg.Insecure(),
+ cfg.JobPipeline(),
+ cfg.OCR(),
+ cfg.OCR2(),
+ cfg.Database(),
+ legacyEVMChains,
+ globalLogger,
+ opts.Version,
+ )
+ }
}
healthChecker := services.NewChecker()
From c8762ee4ee3fc7b2ea5e5c75c3a917ff3d5a4aa8 Mon Sep 17 00:00:00 2001
From: Adam Hamrick
Date: Mon, 18 Sep 2023 18:51:39 -0400
Subject: [PATCH 15/31] Improve Testnet Notifications (#10681)
* Improve Testnet Notifications
* Use cancelled()
* Better check
---
.github/workflows/integration-tests.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index a51f1c6997..8455df90aa 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -168,6 +168,7 @@ jobs:
MATRIX_JSON_KEEPER=$(./scripts/buildTestMatrixList.sh ./smoke/keeper_test.go keeper ubuntu20.04-8cores-32GB 1)
COMBINED_ARRAY=$(jq -c -n "$MATRIX_JSON_AUTOMATION + $MATRIX_JSON_KEEPER")
echo "MATRIX_JSON=${COMBINED_ARRAY}" >> $GITHUB_ENV
+
eth-smoke-tests-matrix-automation:
if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }}
environment: integration
@@ -235,6 +236,7 @@ jobs:
this-job-name: ETH Smoke Tests ${{ matrix.product.name }}
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
continue-on-error: true
+
eth-smoke-tests-matrix:
if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }}
environment: integration
@@ -805,7 +807,7 @@ jobs:
testnet-smoke-tests-notify:
name: Live Testnet Start Slack Thread
- if: success() || failure()
+ if: ${{ needs.*.result != 'skipped' }}
environment: integration
outputs:
thread_ts: ${{ steps.slack.outputs.thread_ts }}
@@ -857,6 +859,7 @@ jobs:
testnet-smoke-tests-results:
name: Post Live Testnet Smoke Test Results
+ if: ${{ needs.*.result != 'skipped' }}
environment: integration
permissions:
checks: write
From eba9a270f6c5cf71a606c4fa8c90f05cf88ea354 Mon Sep 17 00:00:00 2001
From: ilija42 <57732589+ilija42@users.noreply.github.com>
Date: Tue, 19 Sep 2023 01:00:42 +0200
Subject: [PATCH 16/31] BCF-2637 Add evm chain id removal migrations (#10669)
* Add evm chain id removal migrations
* Remove _test db url check for 0195 evm chain id migration
* Improve 0195 migration, improve error msg and sql string constant names
* Update 0195 migration to only add/remove evmChainID not nil constraints
* Remove dangling err handling (leftover from evmChainID removal)
* Update 0195 migration naming
* Add helper function for not null evmChainID migration
* Update changelog for evm chain id not null migration helper function
* Update error message for sql open in shell MigrateDatabase
* Fix job_orm_test test that set evm_chain_id to null
* Fix evmChainID migration helper err when db is init for the first time
* Move goose migration ver check for evmChainID migration in helper func
---
core/cmd/shell.go | 44 +++++++
core/cmd/shell_local.go | 21 +++-
core/internal/cltest/factories.go | 4 +-
core/services/job/job_orm_test.go | 113 +++---------------
...d_not_null_to_evm_chain_id_in_job_specs.go | 49 ++++++++
docs/CHANGELOG.md | 4 +
6 files changed, 131 insertions(+), 104 deletions(-)
create mode 100644 core/store/migrate/migrations/0195_add_not_null_to_evm_chain_id_in_job_specs.go
diff --git a/core/cmd/shell.go b/core/cmd/shell.go
index 2f4da835f2..b9c031fd8b 100644
--- a/core/cmd/shell.go
+++ b/core/cmd/shell.go
@@ -133,6 +133,12 @@ type ChainlinkAppFactory struct{}
func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.GeneralConfig, appLggr logger.Logger, db *sqlx.DB) (app chainlink.Application, err error) {
initGlobals(cfg.Prometheus())
+ // TODO TO BE REMOVED IN v2.7.0
+ err = evmChainIDMigration(cfg, db.DB, appLggr)
+ if err != nil {
+ return nil, err
+ }
+
err = handleNodeVersioning(db, appLggr, cfg.RootDir(), cfg.Database(), cfg.WebServer().HTTPPort())
if err != nil {
return nil, err
@@ -295,6 +301,44 @@ func takeBackupIfVersionUpgrade(dbUrl url.URL, rootDir string, cfg periodicbacku
return err
}
+// evmChainIDMigration TODO TO BE REMOVED IN v2.7.0. This is a helper function for evmChainID 0195 migration in v2.6.0 only, so that we don't have to inject evmChainID into goose.
+func evmChainIDMigration(generalConfig chainlink.GeneralConfig, db *sql.DB, lggr logger.Logger) error {
+ migrationVer, err := migrate.Current(db, lggr)
+ if err != nil {
+ return err
+ }
+ if migrationVer != 194 {
+ return nil
+ }
+
+ if generalConfig.EVMEnabled() {
+ if generalConfig.EVMConfigs() == nil {
+ return errors.New("evm configs are missing")
+ }
+ if generalConfig.EVMConfigs()[0] == nil {
+ return errors.New("evm config is nil")
+ }
+ updateQueries := []string{
+ `UPDATE direct_request_specs SET evm_chain_id = $1 WHERE evm_chain_id IS NULL;`,
+ `UPDATE flux_monitor_specs SET evm_chain_id = $1 WHERE evm_chain_id IS NULL;`,
+ `UPDATE ocr_oracle_specs SET evm_chain_id = $1 WHERE evm_chain_id IS NULL;`,
+ `UPDATE keeper_specs SET evm_chain_id = $1 WHERE evm_chain_id IS NULL;`,
+ `UPDATE vrf_specs SET evm_chain_id = $1 WHERE evm_chain_id IS NULL;`,
+ `UPDATE blockhash_store_specs SET evm_chain_id = $1 WHERE evm_chain_id IS NULL;`,
+ `UPDATE block_header_feeder_specs SET evm_chain_id = $1 WHERE evm_chain_id IS NULL;`,
+ }
+
+ chainID := generalConfig.EVMConfigs()[0].ChainID.String()
+ for i := range updateQueries {
+ _, err := db.Exec(updateQueries[i], chainID)
+ if err != nil {
+ return errors.Wrap(err, "failed to set missing evm chain ids")
+ }
+ }
+ }
+ return nil
+}
+
// Runner implements the Run method.
type Runner interface {
Run(context.Context, chainlink.Application) error
diff --git a/core/cmd/shell_local.go b/core/cmd/shell_local.go
index db4d0476fb..26c0b5ed80 100644
--- a/core/cmd/shell_local.go
+++ b/core/cmd/shell_local.go
@@ -376,9 +376,6 @@ func (s *Shell) runNode(c *cli.Context) error {
legacyEVMChains := app.GetRelayers().LegacyEVMChains()
if s.Config.EVMEnabled() {
- if err != nil {
- return errors.Wrap(err, "error migrating keystore")
- }
chainList, err := legacyEVMChains.List()
if err != nil {
return fmt.Errorf("error listing legacy evm chains: %w", err)
@@ -843,6 +840,23 @@ func (s *Shell) MigrateDatabase(_ *cli.Context) error {
return s.errorOut(errDBURLMissing)
}
+ // TODO TO BE REMOVED IN v2.7.0
+ db, err := sql.Open(string(dialects.Postgres), parsed.String())
+ if err != nil {
+ return fmt.Errorf("unable to open postgres database for evmChainID helper migration: %+v", err)
+ }
+ defer func() {
+ if cerr := db.Close(); cerr != nil {
+ err = multierr.Append(err, cerr)
+ }
+ }()
+
+ // TODO TO BE REMOVED IN v2.7.0
+ err = evmChainIDMigration(s.Config, db, s.Logger)
+ if err != nil {
+ return err
+ }
+
s.Logger.Infof("Migrating database: %#v", parsed.String())
if err := migrateDB(cfg, s.Logger); err != nil {
return s.errorOut(err)
@@ -1026,6 +1040,7 @@ func migrateDB(config dbConfig, lggr logger.Logger) error {
if err != nil {
return fmt.Errorf("failed to initialize orm: %v", err)
}
+
if err = migrate.Migrate(db.DB, lggr); err != nil {
return fmt.Errorf("migrateDB failed: %v", err)
}
diff --git a/core/internal/cltest/factories.go b/core/internal/cltest/factories.go
index 36a89971ca..cb0b51743e 100644
--- a/core/internal/cltest/factories.go
+++ b/core/internal/cltest/factories.go
@@ -624,8 +624,8 @@ func MustInsertOffchainreportingOracleSpec(t *testing.T, db *sqlx.DB, transmitte
ocrKeyID := models.MustSha256HashFromHex(DefaultOCRKeyBundleID)
spec := job.OCROracleSpec{}
- require.NoError(t, db.Get(&spec, `INSERT INTO ocr_oracle_specs (created_at, updated_at, contract_address, p2p_bootstrap_peers, is_bootstrap_peer, encrypted_ocr_key_bundle_id, transmitter_address, observation_timeout, blockchain_timeout, contract_config_tracker_subscribe_interval, contract_config_tracker_poll_interval, contract_config_confirmations, database_timeout, observation_grace_period, contract_transmitter_transmit_timeout) VALUES (
-NOW(),NOW(),$1,'{}',false,$2,$3,0,0,0,0,0,0,0,0
+ require.NoError(t, db.Get(&spec, `INSERT INTO ocr_oracle_specs (created_at, updated_at, contract_address, p2p_bootstrap_peers, is_bootstrap_peer, encrypted_ocr_key_bundle_id, transmitter_address, observation_timeout, blockchain_timeout, contract_config_tracker_subscribe_interval, contract_config_tracker_poll_interval, contract_config_confirmations, database_timeout, observation_grace_period, contract_transmitter_transmit_timeout, evm_chain_id) VALUES (
+NOW(),NOW(),$1,'{}',false,$2,$3,0,0,0,0,0,0,0,0,0
) RETURNING *`, NewEIP55Address(), &ocrKeyID, &transmitterAddress))
return spec
}
diff --git a/core/services/job/job_orm_test.go b/core/services/job/job_orm_test.go
index fb34f92a06..b885bf4f83 100644
--- a/core/services/job/job_orm_test.go
+++ b/core/services/job/job_orm_test.go
@@ -721,33 +721,9 @@ func TestORM_CreateJob_OCR_DuplicatedContractAddress(t *testing.T) {
_, bridge := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{}, config.Database())
_, bridge2 := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{}, config.Database())
- spec := testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
- Name: "job1",
- EVMChainID: testutils.FixtureChainID.String(),
- DS1BridgeName: bridge.Name.String(),
- DS2BridgeName: bridge2.Name.String(),
- TransmitterAddress: address.Hex(),
- })
-
- jb, err := ocr.ValidatedOracleSpecToml(legacyChains, spec.Toml())
- require.NoError(t, err)
-
- // Default Chain Job
- externalJobID := uuid.NullUUID{UUID: uuid.New(), Valid: true}
- spec2 := testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
- Name: "job2",
- EVMChainID: defaultChainID.String(),
- DS1BridgeName: bridge.Name.String(),
- DS2BridgeName: bridge2.Name.String(),
- TransmitterAddress: address.Hex(),
- JobID: externalJobID.UUID.String(),
- })
- jb2, err := ocr.ValidatedOracleSpecToml(legacyChains, spec2.Toml())
- require.NoError(t, err)
-
// Custom Chain Job
- externalJobID = uuid.NullUUID{UUID: uuid.New(), Valid: true}
- spec3 := testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
+ externalJobID := uuid.NullUUID{UUID: uuid.New(), Valid: true}
+ spec := testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
Name: "job3",
EVMChainID: customChainID.String(),
DS1BridgeName: bridge.Name.String(),
@@ -755,53 +731,32 @@ func TestORM_CreateJob_OCR_DuplicatedContractAddress(t *testing.T) {
TransmitterAddress: address.Hex(),
JobID: externalJobID.UUID.String(),
})
- jb3, err := ocr.ValidatedOracleSpecToml(legacyChains, spec3.Toml())
+ jb, err := ocr.ValidatedOracleSpecToml(legacyChains, spec.Toml())
require.NoError(t, err)
- t.Run("with legacy NULL chain id", func(t *testing.T) {
- err = jobORM.CreateJob(&jb)
- require.NoError(t, err)
- _, err := db.ExecContext(testutils.Context(t),
- "UPDATE ocr_oracle_specs o SET evm_chain_id=NULL FROM jobs j WHERE o.id = j.ocr_oracle_spec_id AND j.id=$1", jb.ID)
- require.NoError(t, err)
-
- cltest.AssertCount(t, db, "ocr_oracle_specs", 1)
- cltest.AssertCount(t, db, "jobs", 1)
-
- err = jobORM.CreateJob(&jb2) // try adding job for same contract with default chain id
- require.Error(t, err)
- assert.Equal(t, fmt.Sprintf("CreateJobFailed: a job with contract address %s already exists for chain ID %d", jb2.OCROracleSpec.ContractAddress, jb2.OCROracleSpec.EVMChainID.ToInt()), err.Error())
-
- err = jobORM.CreateJob(&jb3) // Try adding job with custom chain id
- require.Error(t, err)
- assert.Equal(t, fmt.Sprintf("CreateJobFailed: a job with contract address %s already exists for chain ID %d", jb3.OCROracleSpec.ContractAddress, jb3.OCROracleSpec.EVMChainID.ToInt()), err.Error())
- })
-
- require.NoError(t, jobORM.DeleteJob(jb.ID))
-
t.Run("with a set chain id", func(t *testing.T) {
- err = jobORM.CreateJob(&jb3) // Add job with custom chain id
+ err = jobORM.CreateJob(&jb) // Add job with custom chain id
require.NoError(t, err)
cltest.AssertCount(t, db, "ocr_oracle_specs", 1)
cltest.AssertCount(t, db, "jobs", 1)
externalJobID = uuid.NullUUID{UUID: uuid.New(), Valid: true}
- spec3.JobID = externalJobID.UUID.String()
- jb3a, err := ocr.ValidatedOracleSpecToml(legacyChains, spec3.Toml())
+ spec.JobID = externalJobID.UUID.String()
+ jba, err := ocr.ValidatedOracleSpecToml(legacyChains, spec.Toml())
require.NoError(t, err)
- err = jobORM.CreateJob(&jb3a) // Try to add duplicate job with default id
+ err = jobORM.CreateJob(&jba) // Try to add duplicate job with default id
require.Error(t, err)
- assert.Equal(t, fmt.Sprintf("CreateJobFailed: a job with contract address %s already exists for chain ID %s", jb3.OCROracleSpec.ContractAddress, defaultChainID.String()), err.Error())
+ assert.Equal(t, fmt.Sprintf("CreateJobFailed: a job with contract address %s already exists for chain ID %s", jb.OCROracleSpec.ContractAddress, defaultChainID.String()), err.Error())
externalJobID = uuid.NullUUID{UUID: uuid.New(), Valid: true}
- spec3.JobID = externalJobID.UUID.String()
- jb4, err := ocr.ValidatedOracleSpecToml(legacyChains, spec3.Toml())
+ spec.JobID = externalJobID.UUID.String()
+ jb2, err := ocr.ValidatedOracleSpecToml(legacyChains, spec.Toml())
require.NoError(t, err)
- err = jobORM.CreateJob(&jb4) // Try to add duplicate job with custom id
+ err = jobORM.CreateJob(&jb2) // Try to add duplicate job with custom id
require.Error(t, err)
- assert.Equal(t, fmt.Sprintf("CreateJobFailed: a job with contract address %s already exists for chain ID %s", jb4.OCROracleSpec.ContractAddress, customChainID), err.Error())
+ assert.Equal(t, fmt.Sprintf("CreateJobFailed: a job with contract address %s already exists for chain ID %s", jb2.OCROracleSpec.ContractAddress, customChainID), err.Error())
})
}
@@ -1060,9 +1015,8 @@ func Test_FindJobs(t *testing.T) {
func Test_FindJob(t *testing.T) {
t.Parallel()
- // Create a config with multiple EVM chains. The test fixtures already load a 1337 and the
- // default EVM chain ID. Additional chains will need additional fixture statements to add
- // a chain to evm_chains.
+ // Create a config with multiple EVM chains. The test fixtures already load 1337
+ // Additional chains will need additional fixture statements to add a chain to evm_chains.
config := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) {
chainID := utils.NewBigI(1337)
enabled := true
@@ -1146,28 +1100,12 @@ func Test_FindJob(t *testing.T) {
jobOCR2WithFeedID2.Name = null.StringFrom("new name")
require.NoError(t, err)
- // Create a job with the legacy null evm chain id.
- jobWithNullChain, err := ocr.ValidatedOracleSpecToml(legacyChains,
- testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
- JobID: uuid.New().String(),
- ContractAddress: "0xB47f9a6D281B2A82F8692F8dE058E4249363A6fc",
- TransmitterAddress: address.Hex(),
- Name: "ocr legacy null chain id",
- DS1BridgeName: bridge.Name.String(),
- DS2BridgeName: bridge2.Name.String(),
- }).Toml(),
- )
- require.NoError(t, err)
-
err = orm.CreateJob(&job)
require.NoError(t, err)
err = orm.CreateJob(&jobSameAddress)
require.NoError(t, err)
- err = orm.CreateJob(&jobWithNullChain)
- require.NoError(t, err)
-
err = orm.CreateJob(&jobOCR2)
require.NoError(t, err)
@@ -1178,11 +1116,6 @@ func Test_FindJob(t *testing.T) {
err = orm.CreateJob(&jobOCR2WithFeedID2)
require.NoError(t, err)
- // Set the ChainID to null manually since we can't do this in the test helper
- _, err = db.ExecContext(testutils.Context(t),
- "UPDATE ocr_oracle_specs o SET evm_chain_id=NULL FROM jobs j WHERE o.id = j.ocr_oracle_spec_id AND j.id=$1", jobWithNullChain.ID)
- require.NoError(t, err)
-
t.Run("by id", func(t *testing.T) {
ctx, cancel := context.WithTimeout(testutils.Context(t), 5*time.Second)
defer cancel()
@@ -1222,24 +1155,6 @@ func Test_FindJob(t *testing.T) {
require.ErrorIs(t, err, sql.ErrNoRows)
})
- t.Run("by address with legacy null evm chain id", func(t *testing.T) {
- jbID, err := orm.FindJobIDByAddress(
- jobWithNullChain.OCROracleSpec.ContractAddress,
- jobWithNullChain.OCROracleSpec.EVMChainID,
- )
- require.NoError(t, err)
-
- assert.Equal(t, jobWithNullChain.ID, jbID)
-
- jbID, err = orm.FindJobIDByAddress(
- jobWithNullChain.OCROracleSpec.ContractAddress,
- utils.NewBig(nil),
- )
- require.NoError(t, err)
-
- assert.Equal(t, jobWithNullChain.ID, jbID)
- })
-
t.Run("by address yet chain scoped", func(t *testing.T) {
commonAddr := jobSameAddress.OCROracleSpec.ContractAddress
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
new file mode 100644
index 0000000000..4b722c08ba
--- /dev/null
+++ b/core/store/migrate/migrations/0195_add_not_null_to_evm_chain_id_in_job_specs.go
@@ -0,0 +1,49 @@
+package migrations
+
+import (
+ "context"
+ "database/sql"
+
+ "github.com/pkg/errors"
+ "github.com/pressly/goose/v3"
+)
+
+func init() {
+ goose.AddMigrationContext(Up195, Down195)
+}
+
+const (
+ addNullConstraintsToSpecs = `
+ ALTER TABLE direct_request_specs ALTER COLUMN evm_chain_id SET NOT NULL;
+ ALTER TABLE flux_monitor_specs ALTER COLUMN evm_chain_id SET NOT NULL;
+ ALTER TABLE ocr_oracle_specs ALTER COLUMN evm_chain_id SET NOT NULL;
+ ALTER TABLE keeper_specs ALTER COLUMN evm_chain_id SET NOT NULL;
+ ALTER TABLE vrf_specs ALTER COLUMN evm_chain_id SET NOT NULL;
+ ALTER TABLE blockhash_store_specs ALTER COLUMN evm_chain_id SET NOT NULL;
+ ALTER TABLE block_header_feeder_specs ALTER COLUMN evm_chain_id SET NOT NULL;
+ `
+
+ dropNullConstraintsFromSpecs = `
+ ALTER TABLE direct_request_specs ALTER COLUMN evm_chain_id DROP NOT NULL;
+ ALTER TABLE flux_monitor_specs ALTER COLUMN evm_chain_id DROP NOT NULL;
+ ALTER TABLE ocr_oracle_specs ALTER COLUMN evm_chain_id DROP NOT NULL;
+ ALTER TABLE keeper_specs ALTER COLUMN evm_chain_id DROP NOT NULL;
+ ALTER TABLE vrf_specs ALTER COLUMN evm_chain_id DROP NOT NULL;
+ ALTER TABLE blockhash_store_specs ALTER COLUMN evm_chain_id DROP NOT NULL;
+ ALTER TABLE block_header_feeder_specs ALTER COLUMN evm_chain_id DROP NOT NULL;
+ `
+)
+
+// nolint
+func Up195(ctx context.Context, tx *sql.Tx) error {
+ _, err := tx.ExecContext(ctx, addNullConstraintsToSpecs)
+ return errors.Wrap(err, "failed to add null constraints")
+}
+
+// nolint
+func Down195(ctx context.Context, tx *sql.Tx) error {
+ if _, err := tx.ExecContext(ctx, dropNullConstraintsFromSpecs); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index d2e3dfada9..65701c9de6 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [dev]
+### Added
+
+- Temporary helper function for proper migration of evmChainID not null in specs, that fills in missing chainIDs. This needs to be removed after one version after everyone migrated properly. For proper migrations all nodes must upgrade sequentially without skipping this version.
+
### Removed
- Removed support for sending telemetry to the deprecated Explorer service. All nodes will have to remove `Explorer` related keys from TOML configuration and env vars.
From 844516f9dbe38921ca6b9379bdf607b23f91f326 Mon Sep 17 00:00:00 2001
From: Bolek <1416262+bolekk@users.noreply.github.com>
Date: Tue, 19 Sep 2023 06:33:35 -0700
Subject: [PATCH 17/31] [Functions] Fix missing items in subscriptions checker
(#10696)
1. Add a nil-check when constructing the plugin
2. Include subscriptions in Start/Close methods of both handlers
---
core/services/functions/connector_handler.go | 13 ++++++++++---
.../functions/connector_handler_test.go | 2 ++
.../handlers/functions/handler.functions.go | 17 ++++++++++++++---
core/services/ocr2/plugins/functions/plugin.go | 2 +-
4 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/core/services/functions/connector_handler.go b/core/services/functions/connector_handler.go
index 8083dfc2a3..c32bf56f0c 100644
--- a/core/services/functions/connector_handler.go
+++ b/core/services/functions/connector_handler.go
@@ -6,6 +6,8 @@ import (
"encoding/json"
"fmt"
+ "go.uber.org/multierr"
+
"github.com/smartcontractkit/chainlink/v2/core/assets"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/api"
@@ -92,13 +94,18 @@ func (h *functionsConnectorHandler) HandleGatewayMessage(ctx context.Context, ga
func (h *functionsConnectorHandler) Start(ctx context.Context) error {
return h.StartOnce("FunctionsConnectorHandler", func() error {
- return h.allowlist.Start(ctx)
+ if err := h.allowlist.Start(ctx); err != nil {
+ return err
+ }
+ return h.subscriptions.Start(ctx)
})
}
func (h *functionsConnectorHandler) Close() error {
- return h.StopOnce("FunctionsConnectorHandler", func() error {
- return h.allowlist.Close()
+ return h.StopOnce("FunctionsConnectorHandler", func() (err error) {
+ err = multierr.Combine(err, h.allowlist.Close())
+ err = multierr.Combine(err, h.subscriptions.Close())
+ return
})
}
diff --git a/core/services/functions/connector_handler_test.go b/core/services/functions/connector_handler_test.go
index de327f2983..bb3e2acbab 100644
--- a/core/services/functions/connector_handler_test.go
+++ b/core/services/functions/connector_handler_test.go
@@ -37,6 +37,8 @@ func TestFunctionsConnectorHandler(t *testing.T) {
require.NoError(t, err)
allowlist.On("Start", mock.Anything).Return(nil)
allowlist.On("Close", mock.Anything).Return(nil)
+ subscriptions.On("Start", mock.Anything).Return(nil)
+ subscriptions.On("Close", mock.Anything).Return(nil)
handler, err := functions.NewFunctionsConnectorHandler(addr.Hex(), privateKey, storage, allowlist, rateLimiter, subscriptions, *assets.NewLinkFromJuels(0), logger)
require.NoError(t, err)
diff --git a/core/services/gateway/handlers/functions/handler.functions.go b/core/services/gateway/handlers/functions/handler.functions.go
index 722ac13683..82d4976db2 100644
--- a/core/services/gateway/handlers/functions/handler.functions.go
+++ b/core/services/gateway/handlers/functions/handler.functions.go
@@ -10,6 +10,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
+ "go.uber.org/multierr"
"github.com/smartcontractkit/chainlink/v2/core/assets"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm"
@@ -290,7 +291,14 @@ func (h *functionsHandler) Start(ctx context.Context) error {
return h.StartOnce("FunctionsHandler", func() error {
h.lggr.Info("starting FunctionsHandler")
if h.allowlist != nil {
- return h.allowlist.Start(ctx)
+ if err := h.allowlist.Start(ctx); err != nil {
+ return err
+ }
+ }
+ if h.subscriptions != nil {
+ if err := h.subscriptions.Start(ctx); err != nil {
+ return err
+ }
}
return nil
})
@@ -300,8 +308,11 @@ func (h *functionsHandler) Close() error {
return h.StopOnce("FunctionsHandler", func() (err error) {
close(h.chStop)
if h.allowlist != nil {
- return h.allowlist.Close()
+ err = multierr.Combine(err, h.allowlist.Close())
}
- return nil
+ if h.subscriptions != nil {
+ err = multierr.Combine(err, h.subscriptions.Close())
+ }
+ return
})
}
diff --git a/core/services/ocr2/plugins/functions/plugin.go b/core/services/ocr2/plugins/functions/plugin.go
index b4040748e5..6cc7da97d0 100644
--- a/core/services/ocr2/plugins/functions/plugin.go
+++ b/core/services/ocr2/plugins/functions/plugin.go
@@ -131,7 +131,7 @@ func NewFunctionsServices(functionsOracleArgs, thresholdOracleArgs, s4OracleArgs
}
allServices = append(allServices, job.NewServiceAdapter(functionsReportingPluginOracle))
- if pluginConfig.GatewayConnectorConfig != nil && s4Storage != nil && pluginConfig.OnchainAllowlist != nil && pluginConfig.RateLimiter != nil {
+ if pluginConfig.GatewayConnectorConfig != nil && s4Storage != nil && pluginConfig.OnchainAllowlist != nil && pluginConfig.RateLimiter != nil && pluginConfig.OnchainSubscriptions != nil {
allowlist, err2 := gwFunctions.NewOnchainAllowlist(conf.Chain.Client(), *pluginConfig.OnchainAllowlist, conf.Logger)
if err2 != nil {
return nil, errors.Wrap(err, "failed to create OnchainAllowlist")
From fa22dc38b89478d5f9c0124f06c6d30a05b82820 Mon Sep 17 00:00:00 2001
From: Jordan Krage
Date: Tue, 19 Sep 2023 08:38:10 -0500
Subject: [PATCH 18/31] core/services/ocr2/validate: bump
minOCR2MaxDurationQuery to 100ms (#10690)
---
core/services/ocr2/validate/config.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/services/ocr2/validate/config.go b/core/services/ocr2/validate/config.go
index 20c23d95d6..11f225e968 100644
--- a/core/services/ocr2/validate/config.go
+++ b/core/services/ocr2/validate/config.go
@@ -66,7 +66,7 @@ func ToLocalConfig(ocr2Config OCR2Config, insConf InsecureConfig, spec job.OCR2O
}
var (
- minOCR2MaxDurationQuery = 20 * time.Millisecond
+ minOCR2MaxDurationQuery = 100 * time.Millisecond
minOCR2MaxDurationQueryErr error
minOCR2MaxDurationQueryOnce sync.Once
)
From 1eb0fac35e7fd497a9a143e333d6c5917d93a020 Mon Sep 17 00:00:00 2001
From: Sam
Date: Tue, 19 Sep 2023 10:12:23 -0400
Subject: [PATCH 19/31] Bump chainlink-relay =>
8a0b08df72a32b04c377f6f1c698a03ca5b2a1bf (#10692)
---
core/scripts/go.mod | 2 +-
core/scripts/go.sum | 4 ++--
go.mod | 2 +-
go.sum | 4 ++--
integration-tests/go.mod | 2 +-
integration-tests/go.sum | 4 ++--
6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/core/scripts/go.mod b/core/scripts/go.mod
index edc23cf004..5e7f26011f 100644
--- a/core/scripts/go.mod
+++ b/core/scripts/go.mod
@@ -299,7 +299,7 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 // indirect
- github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1 // indirect
+ github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918212835-8a0b08df72a3 // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 // indirect
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
diff --git a/core/scripts/go.sum b/core/scripts/go.sum
index 674b96aff9..54f5d507cf 100644
--- a/core/scripts/go.sum
+++ b/core/scripts/go.sum
@@ -1377,8 +1377,8 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 h1:vdieOW3CZGdD2R5zvCSMS+0vksyExPN3/Fa1uVfld/A=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1 h1:0dCYAYQrYjhoz/NUS4X0HZh09s6fdslGqx8h27hRFf4=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918212835-8a0b08df72a3 h1:FonaZ1kgRK0yY7D0jF5pL3K+0DYUnKcnStOOcIN+Hhg=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918212835-8a0b08df72a3/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca/go.mod h1:RIUJXn7EVp24TL2p4FW79dYjyno23x5mjt1nKN+5WEk=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw=
diff --git a/go.mod b/go.mod
index 19475db45a..73e71154aa 100644
--- a/go.mod
+++ b/go.mod
@@ -67,7 +67,7 @@ require (
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47
- github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1
+ github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918212835-8a0b08df72a3
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918
github.com/smartcontractkit/libocr v0.0.0-20230816220705-665e93233ae5
diff --git a/go.sum b/go.sum
index 7a3aa496e1..b8437fdb66 100644
--- a/go.sum
+++ b/go.sum
@@ -1377,8 +1377,8 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 h1:vdieOW3CZGdD2R5zvCSMS+0vksyExPN3/Fa1uVfld/A=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1 h1:0dCYAYQrYjhoz/NUS4X0HZh09s6fdslGqx8h27hRFf4=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918212835-8a0b08df72a3 h1:FonaZ1kgRK0yY7D0jF5pL3K+0DYUnKcnStOOcIN+Hhg=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918212835-8a0b08df72a3/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca/go.mod h1:RIUJXn7EVp24TL2p4FW79dYjyno23x5mjt1nKN+5WEk=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw=
diff --git a/integration-tests/go.mod b/integration-tests/go.mod
index e5edd10056..badb58db97 100644
--- a/integration-tests/go.mod
+++ b/integration-tests/go.mod
@@ -384,7 +384,7 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 // indirect
- github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1 // indirect
+ github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918212835-8a0b08df72a3 // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 // indirect
github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb // indirect
diff --git a/integration-tests/go.sum b/integration-tests/go.sum
index 9c6c296523..59ca87f752 100644
--- a/integration-tests/go.sum
+++ b/integration-tests/go.sum
@@ -2252,8 +2252,8 @@ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc4
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8=
github.com/smartcontractkit/chainlink-env v0.36.0 h1:CFOjs0c0y3lrHi/fl5qseCH9EQa5W/6CFyOvmhe2VnA=
github.com/smartcontractkit/chainlink-env v0.36.0/go.mod h1:NbRExHmJGnKSYXmvNuJx5VErSx26GtE1AEN/CRzYOg8=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1 h1:0dCYAYQrYjhoz/NUS4X0HZh09s6fdslGqx8h27hRFf4=
-github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918134006-2119b4e577d1/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918212835-8a0b08df72a3 h1:FonaZ1kgRK0yY7D0jF5pL3K+0DYUnKcnStOOcIN+Hhg=
+github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918212835-8a0b08df72a3/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca/go.mod h1:RIUJXn7EVp24TL2p4FW79dYjyno23x5mjt1nKN+5WEk=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw=
From 2cafadbe46f193bf2b01b529e955e382113c4adf Mon Sep 17 00:00:00 2001
From: Awbrey Hughlett
Date: Tue, 19 Sep 2023 09:50:57 -0500
Subject: [PATCH 20/31] Format Block Number As Hex (#10680)
* Format Block Number As Hex
An unmarshalling error was reported on the block number being passed to an rpc
client instance if the block number was a big.Int. The solution was to format it
as a hex encoded uint64 value.
* update to EncodeBig since value is a big.Int to start with
* update tests
---
.../ocr2/plugins/ocr2keeper/evm21/streams_lookup.go | 2 +-
.../ocr2/plugins/ocr2keeper/evm21/streams_lookup_test.go | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup.go b/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup.go
index 1651e2251d..2155b38300 100644
--- a/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup.go
+++ b/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup.go
@@ -235,7 +235,7 @@ func (r *EvmRegistry) allowedToUseMercury(opts *bind.CallOpts, upkeepId *big.Int
}
// call checkCallback function at the block which OCR3 has agreed upon
- err = r.client.CallContext(opts.Context, &resultBytes, "eth_call", args, opts.BlockNumber)
+ err = r.client.CallContext(opts.Context, &resultBytes, "eth_call", args, hexutil.EncodeBig(opts.BlockNumber))
if err != nil {
return encoding.RpcFlakyFailure, encoding.UpkeepFailureReasonNone, true, false, fmt.Errorf("failed to get upkeep privilege config: %v", err)
}
diff --git a/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup_test.go b/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup_test.go
index 95e81b2e1c..42aeecb64f 100644
--- a/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup_test.go
+++ b/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup_test.go
@@ -204,7 +204,7 @@ func TestEvmRegistry_StreamsLookup(t *testing.T) {
"data": hexutil.Bytes(payload),
}
- client.On("CallContext", mock.Anything, mock.AnythingOfType("*hexutil.Bytes"), "eth_call", args, mock.AnythingOfType("*big.Int")).Return(nil).
+ client.On("CallContext", mock.Anything, mock.AnythingOfType("*hexutil.Bytes"), "eth_call", args, mock.AnythingOfType("string")).Return(nil).
Run(func(args mock.Arguments) {
b := args.Get(1).(*hexutil.Bytes)
*b = bContractCfg
@@ -370,7 +370,7 @@ func TestEvmRegistry_AllowedToUseMercury(t *testing.T) {
"data": hexutil.Bytes(payload),
}
- client.On("CallContext", mock.Anything, mock.AnythingOfType("*hexutil.Bytes"), "eth_call", args, mock.AnythingOfType("*big.Int")).
+ client.On("CallContext", mock.Anything, mock.AnythingOfType("*hexutil.Bytes"), "eth_call", args, mock.AnythingOfType("string")).
Return(tt.ethCallErr).
Run(func(args mock.Arguments) {
b := args.Get(1).(*hexutil.Bytes)
@@ -392,7 +392,7 @@ func TestEvmRegistry_AllowedToUseMercury(t *testing.T) {
"data": hexutil.Bytes(payload),
}
- client.On("CallContext", mock.Anything, mock.AnythingOfType("*hexutil.Bytes"), "eth_call", args, mock.AnythingOfType("*big.Int")).Return(nil).
+ client.On("CallContext", mock.Anything, mock.AnythingOfType("*hexutil.Bytes"), "eth_call", args, mock.AnythingOfType("string")).Return(nil).
Run(func(args mock.Arguments) {
b := args.Get(1).(*hexutil.Bytes)
*b = bContractCfg
From 562ac5c5e2a0fea5eaedba9cb6ff725f0ff9a08a Mon Sep 17 00:00:00 2001
From: Jordan Krage
Date: Tue, 19 Sep 2023 10:11:11 -0500
Subject: [PATCH 21/31] BCF-2155: plugins: update readme (#10701)
* plugins: update readme
* added a section on prom
* update prometheus
Co-authored-by: krehermann
* typo
* Update plugins/README.md
Co-authored-by: Patrick
---------
Co-authored-by: krehermann
Co-authored-by: krehermann
Co-authored-by: Patrick
---
plugins/README.md | 36 ++++++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/plugins/README.md b/plugins/README.md
index ab6aeed7a3..73c39c6c94 100644
--- a/plugins/README.md
+++ b/plugins/README.md
@@ -13,18 +13,42 @@ plugin. The [cmd](cmd) directory contains their `package main`s for now. These c
## How to use
[chainlink.Dockerfile](chainlink.Dockerfile) extends the regular [core/chainlink.Dockerfile](../core/chainlink.Dockerfile)
-to include the plugin binaries, and enables support by setting `CL_SOLANA_CMD` and `CL_MEDIAN_CMD`. Either plugin can be
-disabled by un-setting the environment variable, which will revert to the original in-process runtime. Images built from
-this Dockerfile can otherwise be used normally, provided that the [pre-requisites](#pre-requisites) have been met.
+to include the plugin binaries, and enables support by setting `CL_SOLANA_CMD`, `CL_STARKNET_CMD`, and `CL_MEDIAN_CMD`.
+Either plugin can be disabled by un-setting the environment variable, which will revert to the original in-process runtime.
+Images built from this Dockerfile can otherwise be used normally, provided that the [pre-requisites](#pre-requisites) have been met.
### Pre-requisites
#### Timeouts
LOOPPs communicate over GRPC, which always includes a `context.Context` and requires realistic timeouts. Placeholder/dummy
-values (e.g. `MaxDurationQuery = 0`) will not work and must be updated to realistic values.
-
+values (e.g. `MaxDurationQuery = 0`) will not work and must be updated to realistic values. In lieu of reconfiguring already
+deployed contracts on Solana, the environment variable `CL_MIN_OCR2_MAX_DURATION_QUERY` can be set establish a new minimum
+via libocr's [LocalConfig.MinOCR2MaxDurationQuery](https://pkg.go.dev/github.com/smartcontractkit/libocr/offchainreporting2plus/types#LocalConfig).
+If left unset, the default value is `100ms`.
#### Prometheus
-TODO how to preserve metrics https://smartcontract-it.atlassian.net/browse/BCF-2202
+
+LOOPPs are dynamic, and so must be monitoring.
+We use Plugin discovery to dynamically determine what to monitor based on what plugins are running
+and we route external prom scraping to the plugins without exposing them directly
+
+The endpoints are
+
+`/discovery` : HTTP Service Discovery [https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config]
+Prometheus server is configured to poll this url to discover new endpoints to monitor. The node serves the response based on what plugins are running,
+
+`/plugins//metrics`: The node acts as very thin middleware to route from Prometheus server scrape requests to individual plugin /metrics endpoint
+Once a plugin is discovered via the discovery mechanism above, the Prometheus service calls the target endpoint at the scrape interval
+The node acts as middleware to route the request to the /metrics endpoint of the requested plugin
+
+The simplest change to monitor LOOPPs is to add a service discovery to the scrape configuration
+- job_name: 'chainlink_node'
+ ...
++ http_sd_configs:
++ - url: "http://127.0.0.1:6688/discovery"
++ refresh_interval: 30s
+
+
+See the Prometheus documentation for full details [https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config]
\ No newline at end of file
From 7db18d9e20a62989059504bb3f132bea5828e050 Mon Sep 17 00:00:00 2001
From: Cedric
Date: Tue, 19 Sep 2023 16:15:18 +0100
Subject: [PATCH 22/31] [BCF-2488] Fix flake in TestShell_Autologin (and
others) (#10677)
* [BCF-2488] Fix flakey TestShell_Autologin caused by lock timeout
* [BCF-2488] Fix flakey TestShell_Autologin caused by lock timeout
---
core/cmd/renderer_test.go | 2 +-
core/internal/cltest/cltest.go | 43 +++++++++++++------
.../testutils/configtest/v2/general_config.go | 1 +
core/services/job/runner_integration_test.go | 4 +-
core/web/auth/auth_test.go | 17 +++-----
core/web/bridge_types_controller_test.go | 16 +++----
core/web/build_info_controller_test.go | 2 +-
core/web/cors_test.go | 4 +-
core/web/cosmos_chains_controller_test.go | 2 +-
core/web/cosmos_keys_controller_test.go | 4 +-
core/web/dkgencrypt_keys_controller_test.go | 2 +-
core/web/dkgsign_keys_controller_test.go | 2 +-
core/web/eth_keys_controller_test.go | 40 ++++++++---------
core/web/evm_chains_controller_test.go | 2 +-
core/web/evm_forwarders_controller_test.go | 2 +-
core/web/evm_transactions_controller_test.go | 8 ++--
core/web/evm_transfer_controller_test.go | 16 +++----
core/web/evm_tx_attempts_controller_test.go | 4 +-
.../external_initiators_controller_test.go | 12 +++---
core/web/features_controller_test.go | 2 +-
core/web/health_controller_test.go | 2 +-
core/web/jobs_controller_test.go | 12 +++---
core/web/log_controller_test.go | 4 +-
core/web/loop_registry_test.go | 2 +-
core/web/ocr2_keys_controller_test.go | 2 +-
core/web/ocr_keys_controller_test.go | 2 +-
core/web/p2p_keys_controller_test.go | 4 +-
core/web/ping_controller_test.go | 2 +-
core/web/pipeline_runs_controller_test.go | 8 ++--
core/web/router_test.go | 2 +-
core/web/solana_chains_controller_test.go | 2 +-
core/web/solana_keys_controller_test.go | 4 +-
core/web/starknet_keys_controller_test.go | 4 +-
core/web/user_controller_test.go | 22 +++++-----
34 files changed, 138 insertions(+), 119 deletions(-)
diff --git a/core/cmd/renderer_test.go b/core/cmd/renderer_test.go
index 78de49ffed..f617747953 100644
--- a/core/cmd/renderer_test.go
+++ b/core/cmd/renderer_test.go
@@ -37,7 +37,7 @@ func TestRendererTable_RenderConfigurationV2(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
wantUser, wantEffective := app.Config.ConfigTOML()
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
t.Run("effective", func(t *testing.T) {
resp, cleanup := client.Get("/v2/config/v2")
diff --git a/core/internal/cltest/cltest.go b/core/internal/cltest/cltest.go
index 139d66b590..1c5d1ed5bb 100644
--- a/core/internal/cltest/cltest.go
+++ b/core/internal/cltest/cltest.go
@@ -595,10 +595,10 @@ func (ta *TestApplication) Stop() error {
return err
}
-func (ta *TestApplication) MustSeedNewSession(roleFixtureUserAPIEmail string) (id string) {
+func (ta *TestApplication) MustSeedNewSession(email string) (id string) {
session := NewSession()
- ta.Logger.Infof("TestApplication creating session (id: %s, email: %s, last used: %s)", session.ID, roleFixtureUserAPIEmail, session.LastUsed.String())
- err := ta.GetSqlxDB().Get(&id, `INSERT INTO sessions (id, email, last_used, created_at) VALUES ($1, $2, $3, NOW()) RETURNING id`, session.ID, roleFixtureUserAPIEmail, session.LastUsed)
+ ta.Logger.Infof("TestApplication creating session (id: %s, email: %s, last used: %s)", session.ID, email, session.LastUsed.String())
+ err := ta.GetSqlxDB().Get(&id, `INSERT INTO sessions (id, email, last_used, created_at) VALUES ($1, $2, $3, NOW()) RETURNING id`, session.ID, email, session.LastUsed)
require.NoError(ta.t, err)
return id
}
@@ -610,10 +610,29 @@ func (ta *TestApplication) Import(content string) {
require.NoError(ta.t, err)
}
-func (ta *TestApplication) NewHTTPClient(roleFixtureUserAPIEmail string) HTTPClientCleaner {
+type User struct {
+ Email string
+ Role clsessions.UserRole
+}
+
+func (ta *TestApplication) NewHTTPClient(user *User) HTTPClientCleaner {
ta.t.Helper()
- sessionID := ta.MustSeedNewSession(roleFixtureUserAPIEmail)
+ if user.Email == "" {
+ user.Email = fmt.Sprintf("%s@chainlink.test", uuid.New())
+ }
+
+ if user.Role == "" {
+ user.Role = clsessions.UserRoleAdmin
+ }
+
+ u, err := clsessions.NewUser(user.Email, Password, user.Role)
+ require.NoError(ta.t, err)
+
+ err = ta.SessionORM().CreateUser(&u)
+ require.NoError(ta.t, err)
+
+ sessionID := ta.MustSeedNewSession(user.Email)
return HTTPClientCleaner{
HTTPClient: NewMockAuthenticatedHTTPClient(ta.Logger, ta.NewClientOpts(), sessionID),
@@ -627,7 +646,7 @@ func (ta *TestApplication) NewClientOpts() cmd.ClientOpts {
// NewShellAndRenderer creates a new cmd.Shell for the test application
func (ta *TestApplication) NewShellAndRenderer() (*cmd.Shell, *RendererMock) {
- sessionID := ta.MustSeedNewSession(APIEmailAdmin)
+ hc := ta.NewHTTPClient(&User{})
r := &RendererMock{}
lggr := logger.TestLogger(ta.t)
client := &cmd.Shell{
@@ -637,7 +656,7 @@ func (ta *TestApplication) NewShellAndRenderer() (*cmd.Shell, *RendererMock) {
AppFactory: seededAppFactory{ta.ChainlinkApplication},
FallbackAPIInitializer: NewMockAPIInitializer(ta.t),
Runner: EmptyRunner{},
- HTTP: NewMockAuthenticatedHTTPClient(ta.Logger, ta.NewClientOpts(), sessionID),
+ HTTP: hc.HTTPClient,
CookieAuthenticator: MockCookieAuthenticator{t: ta.t},
FileSessionRequestBuilder: &MockSessionRequestBuilder{},
PromptingSessionRequestBuilder: &MockSessionRequestBuilder{},
@@ -789,7 +808,7 @@ func ParseJSONAPIResponseMetaCount(input []byte) (int, error) {
func CreateJobViaWeb(t testing.TB, app *TestApplication, request []byte) job.Job {
t.Helper()
- client := app.NewHTTPClient(APIEmailAdmin)
+ client := app.NewHTTPClient(&User{})
resp, cleanup := client.Post("/v2/jobs", bytes.NewBuffer(request))
defer cleanup()
AssertServerResponse(t, resp, http.StatusOK)
@@ -803,7 +822,7 @@ func CreateJobViaWeb(t testing.TB, app *TestApplication, request []byte) job.Job
func CreateJobViaWeb2(t testing.TB, app *TestApplication, spec string) webpresenters.JobResource {
t.Helper()
- client := app.NewHTTPClient(APIEmailAdmin)
+ client := app.NewHTTPClient(&User{})
resp, cleanup := client.Post("/v2/jobs", bytes.NewBufferString(spec))
defer cleanup()
AssertServerResponse(t, resp, http.StatusOK)
@@ -817,7 +836,7 @@ func CreateJobViaWeb2(t testing.TB, app *TestApplication, spec string) webpresen
func DeleteJobViaWeb(t testing.TB, app *TestApplication, jobID int32) {
t.Helper()
- client := app.NewHTTPClient(APIEmailAdmin)
+ client := app.NewHTTPClient(&User{})
resp, cleanup := client.Delete(fmt.Sprintf("/v2/jobs/%v", jobID))
defer cleanup()
AssertServerResponse(t, resp, http.StatusNoContent)
@@ -866,7 +885,7 @@ func CreateJobRunViaUser(
t.Helper()
bodyBuf := bytes.NewBufferString(body)
- client := app.NewHTTPClient(APIEmailAdmin)
+ client := app.NewHTTPClient(&User{})
resp, cleanup := client.Post("/v2/jobs/"+jobID.String()+"/runs", bodyBuf)
defer cleanup()
AssertServerResponse(t, resp, 200)
@@ -885,7 +904,7 @@ func CreateExternalInitiatorViaWeb(
) *webpresenters.ExternalInitiatorAuthentication {
t.Helper()
- client := app.NewHTTPClient(APIEmailAdmin)
+ client := app.NewHTTPClient(&User{})
resp, cleanup := client.Post(
"/v2/external_initiators",
bytes.NewBufferString(payload),
diff --git a/core/internal/testutils/configtest/v2/general_config.go b/core/internal/testutils/configtest/v2/general_config.go
index 34843c740d..febbb367bd 100644
--- a/core/internal/testutils/configtest/v2/general_config.go
+++ b/core/internal/testutils/configtest/v2/general_config.go
@@ -50,6 +50,7 @@ func overrides(c *chainlink.Config, s *chainlink.Secrets) {
c.Database.MaxIdleConns = ptr[int64](20)
c.Database.MaxOpenConns = ptr[int64](20)
c.Database.MigrateOnStartup = ptr(false)
+ c.Database.DefaultLockTimeout = models.MustNewDuration(1 * time.Minute)
c.JobPipeline.ReaperInterval = models.MustNewDuration(0)
diff --git a/core/services/job/runner_integration_test.go b/core/services/job/runner_integration_test.go
index da670f99a7..a886c52f28 100644
--- a/core/services/job/runner_integration_test.go
+++ b/core/services/job/runner_integration_test.go
@@ -911,7 +911,7 @@ func TestRunner_Success_Callback_AsyncJob(t *testing.T) {
{
url, err := url.Parse(responseURL)
require.NoError(t, err)
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
body := strings.NewReader(`{"value": {"data":{"result":"123.45"}}}`)
response, cleanup := client.Patch(url.Path, body)
defer cleanup()
@@ -1092,7 +1092,7 @@ func TestRunner_Error_Callback_AsyncJob(t *testing.T) {
{
url, err := url.Parse(responseURL)
require.NoError(t, err)
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
body := strings.NewReader(`{"error": "something exploded in EA"}`)
response, cleanup := client.Patch(url.Path, body)
defer cleanup()
diff --git a/core/web/auth/auth_test.go b/core/web/auth/auth_test.go
index 1adfeadfb1..ce369fce1b 100644
--- a/core/web/auth/auth_test.go
+++ b/core/web/auth/auth_test.go
@@ -307,7 +307,7 @@ func TestRBAC_Routemap_Admin(t *testing.T) {
// Assert all admin routes
// no endpoint should return StatusUnauthorized
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
for _, route := range routesRolesMap {
func() {
var resp *http.Response
@@ -344,9 +344,8 @@ func TestRBAC_Routemap_Edit(t *testing.T) {
defer ts.Close()
// Create a test edit user to work with
- testUser := cltest.CreateUserWithRole(t, sessions.UserRoleEdit)
- require.NoError(t, app.SessionORM().CreateUser(&testUser))
- client := app.NewHTTPClient(testUser.Email)
+ u := &cltest.User{Role: sessions.UserRoleEdit}
+ client := app.NewHTTPClient(u)
// Assert all edit routes
for _, route := range routesRolesMap {
@@ -392,9 +391,8 @@ func TestRBAC_Routemap_Run(t *testing.T) {
defer ts.Close()
// Create a test run user to work with
- testUser := cltest.CreateUserWithRole(t, sessions.UserRoleRun)
- require.NoError(t, app.SessionORM().CreateUser(&testUser))
- client := app.NewHTTPClient(testUser.Email)
+ u := &cltest.User{Role: sessions.UserRoleRun}
+ client := app.NewHTTPClient(u)
// Assert all run routes
for _, route := range routesRolesMap {
@@ -440,9 +438,8 @@ func TestRBAC_Routemap_ViewOnly(t *testing.T) {
defer ts.Close()
// Create a test run user to work with
- testUser := cltest.CreateUserWithRole(t, sessions.UserRoleView)
- require.NoError(t, app.SessionORM().CreateUser(&testUser))
- client := app.NewHTTPClient(testUser.Email)
+ u := &cltest.User{Role: sessions.UserRoleView}
+ client := app.NewHTTPClient(u)
// Assert all view only routes
for i, route := range routesRolesMap {
diff --git a/core/web/bridge_types_controller_test.go b/core/web/bridge_types_controller_test.go
index 75baa8b9b4..c875df9453 100644
--- a/core/web/bridge_types_controller_test.go
+++ b/core/web/bridge_types_controller_test.go
@@ -134,7 +134,7 @@ func TestValidateBridgeNotExist(t *testing.T) {
func BenchmarkBridgeTypesController_Index(b *testing.B) {
app := cltest.NewApplication(b)
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
b.ResetTimer()
for n := 0; n < b.N; n++ {
@@ -149,7 +149,7 @@ func TestBridgeTypesController_Index(t *testing.T) {
app := cltest.NewApplication(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
bt, err := setupBridgeControllerIndex(t, app.BridgeORM())
assert.NoError(t, err)
@@ -217,7 +217,7 @@ func TestBridgeTypesController_Create_Success(t *testing.T) {
app := cltest.NewApplication(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Post(
"/v2/bridge_types",
@@ -245,7 +245,7 @@ func TestBridgeTypesController_Update_Success(t *testing.T) {
app := cltest.NewApplication(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
bridgeName := testutils.RandomizeName("BRidgea")
bt := &bridges.BridgeType{
@@ -271,7 +271,7 @@ func TestBridgeController_Show(t *testing.T) {
app := cltest.NewApplication(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
bt := &bridges.BridgeType{
Name: bridges.MustParseBridgeName(testutils.RandomizeName("showbridge")),
@@ -301,7 +301,7 @@ func TestBridgeTypesController_Create_AdapterExistsError(t *testing.T) {
app := cltest.NewApplication(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Post(
"/v2/bridge_types",
@@ -317,7 +317,7 @@ func TestBridgeTypesController_Create_BindJSONError(t *testing.T) {
app := cltest.NewApplication(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Post(
"/v2/bridge_types",
@@ -333,7 +333,7 @@ func TestBridgeTypesController_Create_DatabaseError(t *testing.T) {
app := cltest.NewApplication(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Post(
"/v2/bridge_types",
diff --git a/core/web/build_info_controller_test.go b/core/web/build_info_controller_test.go
index 96e7758363..9a71951ed3 100644
--- a/core/web/build_info_controller_test.go
+++ b/core/web/build_info_controller_test.go
@@ -18,7 +18,7 @@ func TestBuildInfoController_Show_APICredentials(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Get("/v2/build_info")
defer cleanup()
diff --git a/core/web/cors_test.go b/core/web/cors_test.go
index 760b906690..120a27c645 100644
--- a/core/web/cors_test.go
+++ b/core/web/cors_test.go
@@ -29,7 +29,7 @@ func TestCors_DefaultOrigins(t *testing.T) {
t.Run(test.origin, func(t *testing.T) {
app := cltest.NewApplicationWithConfig(t, config)
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
headers := map[string]string{"Origin": test.origin}
resp, cleanup := client.Get("/v2/chains/evm", headers)
@@ -61,7 +61,7 @@ func TestCors_OverrideOrigins(t *testing.T) {
})
app := cltest.NewApplicationWithConfig(t, config)
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
headers := map[string]string{"Origin": test.origin}
resp, cleanup := client.Get("/v2/chains/evm", headers)
diff --git a/core/web/cosmos_chains_controller_test.go b/core/web/cosmos_chains_controller_test.go
index 3fc42f3d86..f443fb6422 100644
--- a/core/web/cosmos_chains_controller_test.go
+++ b/core/web/cosmos_chains_controller_test.go
@@ -185,7 +185,7 @@ func setupCosmosChainsControllerTestV2(t *testing.T, cfgs ...*cosmos.CosmosConfi
app := cltest.NewApplicationWithConfig(t, cfg)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
return &TestCosmosChainsController{
app: app,
diff --git a/core/web/cosmos_keys_controller_test.go b/core/web/cosmos_keys_controller_test.go
index b5f3ba8297..479ee686d5 100644
--- a/core/web/cosmos_keys_controller_test.go
+++ b/core/web/cosmos_keys_controller_test.go
@@ -41,7 +41,7 @@ func TestCosmosKeysController_Create_HappyPath(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
keyStore := app.GetKeyStore()
response, cleanup := client.Post("/v2/keys/cosmos", nil)
@@ -98,7 +98,7 @@ func setupCosmosKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, key
require.NoError(t, app.Start(testutils.Context(t)))
require.NoError(t, app.KeyStore.Cosmos().Add(cltest.DefaultCosmosKey))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
return client, app.GetKeyStore()
}
diff --git a/core/web/dkgencrypt_keys_controller_test.go b/core/web/dkgencrypt_keys_controller_test.go
index 605d6f0008..5d8b1ab232 100644
--- a/core/web/dkgencrypt_keys_controller_test.go
+++ b/core/web/dkgencrypt_keys_controller_test.go
@@ -103,7 +103,7 @@ func setupDKGEncryptKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner,
require.NoError(t, app.Start(testutils.Context(t)))
require.NoError(t, app.KeyStore.DKGEncrypt().Add(cltest.DefaultDKGEncryptKey))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
return client, app.GetKeyStore()
}
diff --git a/core/web/dkgsign_keys_controller_test.go b/core/web/dkgsign_keys_controller_test.go
index ee5be661fc..0d6d167df9 100644
--- a/core/web/dkgsign_keys_controller_test.go
+++ b/core/web/dkgsign_keys_controller_test.go
@@ -103,7 +103,7 @@ func setupDKGSignKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, ke
require.NoError(t, app.Start(testutils.Context(t)))
require.NoError(t, app.KeyStore.DKGSign().Add(cltest.DefaultDKGSignKey))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
return client, app.GetKeyStore()
}
diff --git a/core/web/eth_keys_controller_test.go b/core/web/eth_keys_controller_test.go
index 104e487b20..c36ca0aeb5 100644
--- a/core/web/eth_keys_controller_test.go
+++ b/core/web/eth_keys_controller_test.go
@@ -56,7 +56,7 @@ func TestETHKeysController_Index_Success(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Get("/v2/keys/evm")
defer cleanup()
require.Equal(t, http.StatusOK, resp.StatusCode)
@@ -100,7 +100,7 @@ func TestETHKeysController_Index_Errors(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Get("/v2/keys/eth")
defer cleanup()
require.Equal(t, http.StatusOK, resp.StatusCode)
@@ -134,7 +134,7 @@ func TestETHKeysController_Index_Disabled(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Get("/v2/keys/eth")
defer cleanup()
require.Equal(t, http.StatusOK, resp.StatusCode)
@@ -169,7 +169,7 @@ func TestETHKeysController_Index_NotDev(t *testing.T) {
app := cltest.NewApplicationWithConfigAndKey(t, cfg, ethClient)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Get("/v2/keys/eth")
defer cleanup()
require.Equal(t, http.StatusOK, resp.StatusCode)
@@ -194,7 +194,7 @@ func TestETHKeysController_Index_NoAccounts(t *testing.T) {
app := cltest.NewApplication(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Get("/v2/keys/eth")
defer cleanup()
@@ -224,7 +224,7 @@ func TestETHKeysController_CreateSuccess(t *testing.T) {
linkBalance := assets.NewLinkFromJuels(42)
ethClient.On("LINKBalance", mock.Anything, mock.Anything, mock.Anything).Return(linkBalance, nil)
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
require.NoError(t, app.Start(testutils.Context(t)))
@@ -266,7 +266,7 @@ func TestETHKeysController_ChainSuccess_UpdateNonce(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/chain"}
query := chainURL.Query()
@@ -310,7 +310,7 @@ func TestETHKeysController_ChainSuccess_Disable(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/chain"}
query := chainURL.Query()
@@ -354,7 +354,7 @@ func TestETHKeysController_ChainSuccess_Enable(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/chain"}
query := chainURL.Query()
@@ -418,7 +418,7 @@ func TestETHKeysController_ChainSuccess_ResetWithAbandon(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, 0, count)
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/chain"}
query := chainURL.Query()
@@ -463,7 +463,7 @@ func TestETHKeysController_ChainFailure_InvalidAbandon(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/chain"}
query := chainURL.Query()
@@ -497,7 +497,7 @@ func TestETHKeysController_ChainFailure_InvalidEnabled(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/chain"}
query := chainURL.Query()
@@ -528,7 +528,7 @@ func TestETHKeysController_ChainFailure_InvalidAddress(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/chain"}
query := chainURL.Query()
@@ -558,7 +558,7 @@ func TestETHKeysController_ChainFailure_MissingAddress(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/chain"}
query := chainURL.Query()
@@ -588,7 +588,7 @@ func TestETHKeysController_ChainFailure_InvalidChainID(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/chain"}
query := chainURL.Query()
@@ -621,7 +621,7 @@ func TestETHKeysController_ChainFailure_MissingChainID(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/chain"}
query := chainURL.Query()
@@ -654,7 +654,7 @@ func TestETHKeysController_ChainFailure_InvalidNonce(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/chain"}
query := chainURL.Query()
@@ -690,7 +690,7 @@ func TestETHKeysController_DeleteSuccess(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/" + addr0.Hex()}
resp, cleanup := client.Delete(chainURL.String())
defer cleanup()
@@ -732,7 +732,7 @@ func TestETHKeysController_DeleteFailure_InvalidAddress(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm" + "/bad_address"}
resp, cleanup := client.Delete(chainURL.String())
@@ -753,7 +753,7 @@ func TestETHKeysController_DeleteFailure_KeyMissing(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
chainURL := url.URL{Path: "/v2/keys/evm/" + testutils.NewAddress().Hex()}
resp, cleanup := client.Delete(chainURL.String())
diff --git a/core/web/evm_chains_controller_test.go b/core/web/evm_chains_controller_test.go
index 6c779868d1..02e493a43b 100644
--- a/core/web/evm_chains_controller_test.go
+++ b/core/web/evm_chains_controller_test.go
@@ -204,7 +204,7 @@ func setupEVMChainsControllerTest(t *testing.T, cfg chainlink.GeneralConfig) *Te
app := cltest.NewApplicationWithConfig(t, cfg)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
return &TestEVMChainsController{
app: app,
diff --git a/core/web/evm_forwarders_controller_test.go b/core/web/evm_forwarders_controller_test.go
index 705fce05c0..8927c01402 100644
--- a/core/web/evm_forwarders_controller_test.go
+++ b/core/web/evm_forwarders_controller_test.go
@@ -32,7 +32,7 @@ func setupEVMForwardersControllerTest(t *testing.T, overrideFn func(c *chainlink
app := cltest.NewApplicationWithConfig(t, configtest.NewGeneralConfig(t, overrideFn))
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
return &TestEVMForwardersController{
app: app,
diff --git a/core/web/evm_transactions_controller_test.go b/core/web/evm_transactions_controller_test.go
index 475bb77830..951d9d9925 100644
--- a/core/web/evm_transactions_controller_test.go
+++ b/core/web/evm_transactions_controller_test.go
@@ -27,7 +27,7 @@ func TestTransactionsController_Index_Success(t *testing.T) {
db := app.GetSqlxDB()
txStore := cltest.NewTestTxStore(t, app.GetSqlxDB(), app.GetConfig().Database())
ethKeyStore := cltest.NewKeyStore(t, db, app.Config.Database()).Eth()
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
_, from := cltest.MustInsertRandomKey(t, ethKeyStore, 0)
cltest.MustInsertConfirmedEthTxWithLegacyAttempt(t, txStore, 0, 1, from) // tx1
@@ -69,7 +69,7 @@ func TestTransactionsController_Index_Error(t *testing.T) {
app := cltest.NewApplicationWithKey(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Get("/v2/transactions?size=TrainingDay")
t.Cleanup(cleanup)
cltest.AssertServerResponse(t, resp, 422)
@@ -82,7 +82,7 @@ func TestTransactionsController_Show_Success(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
txStore := cltest.NewTestTxStore(t, app.GetSqlxDB(), app.GetConfig().Database())
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
_, from := cltest.MustInsertRandomKey(t, app.KeyStore.Eth(), 0)
tx := cltest.MustInsertUnconfirmedEthTxWithBroadcastLegacyAttempt(t, txStore, 1, from)
@@ -115,7 +115,7 @@ func TestTransactionsController_Show_NotFound(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
txStore := cltest.NewTestTxStore(t, app.GetSqlxDB(), app.GetConfig().Database())
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
_, from := cltest.MustInsertRandomKey(t, app.KeyStore.Eth(), 0)
tx := cltest.MustInsertUnconfirmedEthTxWithBroadcastLegacyAttempt(t, txStore, 1, from)
require.Len(t, tx.TxAttempts, 1)
diff --git a/core/web/evm_transfer_controller_test.go b/core/web/evm_transfer_controller_test.go
index 70d4c7d5e0..8b44b3eb6b 100644
--- a/core/web/evm_transfer_controller_test.go
+++ b/core/web/evm_transfer_controller_test.go
@@ -45,7 +45,7 @@ func TestTransfersController_CreateSuccess_From(t *testing.T) {
app := cltest.NewApplicationWithKey(t, ethClient, key)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
amount, err := assets.NewEthValueS("100")
require.NoError(t, err)
@@ -87,7 +87,7 @@ func TestTransfersController_CreateSuccess_From_WEI(t *testing.T) {
app := cltest.NewApplicationWithKey(t, ethClient, key)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
amount := assets.NewEthValue(1000000000000000000)
@@ -132,7 +132,7 @@ func TestTransfersController_CreateSuccess_From_BalanceMonitorDisabled(t *testin
app := cltest.NewApplicationWithConfigAndKey(t, config, ethClient, key)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
amount, err := assets.NewEthValueS("100")
require.NoError(t, err)
@@ -167,7 +167,7 @@ func TestTransfersController_TransferZeroAddressError(t *testing.T) {
amount, err := assets.NewEthValueS("100")
require.NoError(t, err)
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
request := models.SendEtherRequest{
DestinationAddress: common.HexToAddress("0xFA01FA015C8A5332987319823728982379128371"),
FromAddress: common.HexToAddress("0x0000000000000000000000000000000000000000"),
@@ -197,7 +197,7 @@ func TestTransfersController_TransferBalanceToLowError(t *testing.T) {
app := cltest.NewApplicationWithKey(t, ethClient, key)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
amount, err := assets.NewEthValueS("100")
require.NoError(t, err)
@@ -235,7 +235,7 @@ func TestTransfersController_TransferBalanceToLowError_ZeroBalance(t *testing.T)
app := cltest.NewApplicationWithKey(t, ethClient, key)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
amount, err := assets.NewEthValueS("100")
require.NoError(t, err)
@@ -263,7 +263,7 @@ func TestTransfersController_JSONBindingError(t *testing.T) {
app := cltest.NewApplicationWithKey(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Post("/v2/transfers", bytes.NewBuffer([]byte(`{"address":""}`)))
t.Cleanup(cleanup)
@@ -297,7 +297,7 @@ func TestTransfersController_CreateSuccess_eip1559(t *testing.T) {
app := cltest.NewApplicationWithConfigAndKey(t, config, ethClient, key)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
amount, err := assets.NewEthValueS("100")
require.NoError(t, err)
diff --git a/core/web/evm_tx_attempts_controller_test.go b/core/web/evm_tx_attempts_controller_test.go
index 9fd19cb10f..abf80add21 100644
--- a/core/web/evm_tx_attempts_controller_test.go
+++ b/core/web/evm_tx_attempts_controller_test.go
@@ -21,7 +21,7 @@ func TestTxAttemptsController_Index_Success(t *testing.T) {
require.NoError(t, app.Start(testutils.Context(t)))
txStore := cltest.NewTestTxStore(t, app.GetSqlxDB(), app.GetConfig().Database())
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
_, from := cltest.MustInsertRandomKey(t, app.KeyStore.Eth(), 0)
@@ -51,7 +51,7 @@ func TestTxAttemptsController_Index_Error(t *testing.T) {
app := cltest.NewApplicationWithKey(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Get("/v2/tx_attempts?size=TrainingDay")
t.Cleanup(cleanup)
cltest.AssertServerResponse(t, resp, 422)
diff --git a/core/web/external_initiators_controller_test.go b/core/web/external_initiators_controller_test.go
index 5fb8969d26..bc7d46a4f9 100644
--- a/core/web/external_initiators_controller_test.go
+++ b/core/web/external_initiators_controller_test.go
@@ -74,7 +74,7 @@ func TestExternalInitiatorsController_Index(t *testing.T) {
}))
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
db := app.GetSqlxDB()
borm := bridges.NewORM(db, logger.TestLogger(t), app.GetConfig().Database())
@@ -140,7 +140,7 @@ func TestExternalInitiatorsController_Create_success(t *testing.T) {
}))
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Post("/v2/external_initiators",
bytes.NewBufferString(`{"name":"bitcoin","url":"http://without.a.name"}`),
@@ -168,7 +168,7 @@ func TestExternalInitiatorsController_Create_without_URL(t *testing.T) {
}))
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Post("/v2/external_initiators",
bytes.NewBufferString(`{"name":"no-url"}`),
@@ -196,7 +196,7 @@ func TestExternalInitiatorsController_Create_invalid(t *testing.T) {
}))
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Post("/v2/external_initiators",
bytes.NewBufferString(`{"url":"http://without.a.name"}`),
@@ -220,7 +220,7 @@ func TestExternalInitiatorsController_Delete(t *testing.T) {
err := app.BridgeORM().CreateExternalInitiator(&exi)
require.NoError(t, err)
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Delete("/v2/external_initiators/" + exi.Name)
t.Cleanup(cleanup)
@@ -236,7 +236,7 @@ func TestExternalInitiatorsController_DeleteNotFound(t *testing.T) {
}))
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
tests := []struct {
Name string
diff --git a/core/web/features_controller_test.go b/core/web/features_controller_test.go
index 82b68bcbac..3352009334 100644
--- a/core/web/features_controller_test.go
+++ b/core/web/features_controller_test.go
@@ -21,7 +21,7 @@ func Test_FeaturesController_List(t *testing.T) {
c.Feature.UICSAKeys = &csa
}))
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Get("/v2/features")
t.Cleanup(cleanup)
diff --git a/core/web/health_controller_test.go b/core/web/health_controller_test.go
index 020038b2f3..5f915dfedc 100644
--- a/core/web/health_controller_test.go
+++ b/core/web/health_controller_test.go
@@ -40,7 +40,7 @@ func TestHealthController_Readyz(t *testing.T) {
app.HealthChecker = healthChecker
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Get("/readyz")
t.Cleanup(cleanup)
assert.Equal(t, tc.status, resp.StatusCode)
diff --git a/core/web/jobs_controller_test.go b/core/web/jobs_controller_test.go
index d6d3f459a8..f18fcdd8c2 100644
--- a/core/web/jobs_controller_test.go
+++ b/core/web/jobs_controller_test.go
@@ -359,7 +359,7 @@ func TestJobsController_Create_WebhookSpec(t *testing.T) {
_, fetchBridge := cltest.MustCreateBridge(t, app.GetSqlxDB(), cltest.BridgeOpts{}, app.GetConfig().Database())
_, submitBridge := cltest.MustCreateBridge(t, app.GetSqlxDB(), cltest.BridgeOpts{}, app.GetConfig().Database())
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
tomlStr := fmt.Sprintf(testspecs.WebhookSpecNoBody, fetchBridge.Name.String(), submitBridge.Name.String())
body, _ := json.Marshal(web.CreateJobRequest{
@@ -382,7 +382,7 @@ func TestJobsController_FailToCreate_EmptyJsonAttribute(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
tomlBytes := cltest.MustReadFile(t, "../testdata/tomlspecs/webhook-job-spec-with-empty-json.toml")
body, _ := json.Marshal(web.CreateJobRequest{
@@ -493,7 +493,7 @@ func TestJobsController_Update_HappyPath(t *testing.T) {
_, bridge := cltest.MustCreateBridge(t, app.GetSqlxDB(), cltest.BridgeOpts{}, app.GetConfig().Database())
_, bridge2 := cltest.MustCreateBridge(t, app.GetSqlxDB(), cltest.BridgeOpts{}, app.GetConfig().Database())
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
var jb job.Job
ocrspec := testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
@@ -555,7 +555,7 @@ func TestJobsController_Update_NonExistentID(t *testing.T) {
_, bridge := cltest.MustCreateBridge(t, app.GetSqlxDB(), cltest.BridgeOpts{}, app.GetConfig().Database())
_, bridge2 := cltest.MustCreateBridge(t, app.GetSqlxDB(), cltest.BridgeOpts{}, app.GetConfig().Database())
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
var jb job.Job
ocrspec := testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
@@ -635,7 +635,7 @@ func setupJobsControllerTests(t *testing.T) (ta *cltest.TestApplication, cc clte
app := cltest.NewApplicationWithConfigAndKey(t, cfg, cltest.DefaultP2PKey)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
vrfKeyStore := app.GetKeyStore().VRF()
_, err := vrfKeyStore.Create()
require.NoError(t, err)
@@ -656,7 +656,7 @@ func setupJobSpecsControllerTestsWithJobs(t *testing.T) (*cltest.TestApplication
_, bridge := cltest.MustCreateBridge(t, app.GetSqlxDB(), cltest.BridgeOpts{}, app.GetConfig().Database())
_, bridge2 := cltest.MustCreateBridge(t, app.GetSqlxDB(), cltest.BridgeOpts{}, app.GetConfig().Database())
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
var jb job.Job
ocrspec := testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{DS1BridgeName: bridge.Name.String(), DS2BridgeName: bridge2.Name.String(), EVMChainID: testutils.FixtureChainID.String()})
diff --git a/core/web/log_controller_test.go b/core/web/log_controller_test.go
index 7a427bcb8e..029dc4e8d3 100644
--- a/core/web/log_controller_test.go
+++ b/core/web/log_controller_test.go
@@ -41,7 +41,7 @@ func TestLogController_GetLogConfig(t *testing.T) {
app := cltest.NewApplicationWithConfig(t, cfg)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, err := client.HTTPClient.Get("/v2/log")
require.NoError(t, err)
@@ -112,7 +112,7 @@ func TestLogController_PatchLogConfig(t *testing.T) {
t.Run(tc.Description, func(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
request := web.LogPatchRequest{Level: tc.logLevel, SqlEnabled: tc.logSql}
diff --git a/core/web/loop_registry_test.go b/core/web/loop_registry_test.go
index 58a88dad21..848579214f 100644
--- a/core/web/loop_registry_test.go
+++ b/core/web/loop_registry_test.go
@@ -96,7 +96,7 @@ func TestLoopRegistry(t *testing.T) {
defer mockLoop.close()
mockLoop.run()
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
t.Run("discovery endpoint", func(t *testing.T) {
// under the covers this is routing thru the app into loop registry
diff --git a/core/web/ocr2_keys_controller_test.go b/core/web/ocr2_keys_controller_test.go
index 418510cea1..f69ed41f9d 100644
--- a/core/web/ocr2_keys_controller_test.go
+++ b/core/web/ocr2_keys_controller_test.go
@@ -101,7 +101,7 @@ func setupOCR2KeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, keyst
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
require.NoError(t, app.KeyStore.OCR2().Add(cltest.DefaultOCR2Key))
diff --git a/core/web/ocr_keys_controller_test.go b/core/web/ocr_keys_controller_test.go
index 94a8ad8d07..911947fcb7 100644
--- a/core/web/ocr_keys_controller_test.go
+++ b/core/web/ocr_keys_controller_test.go
@@ -89,7 +89,7 @@ func setupOCRKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, keysto
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
require.NoError(t, app.KeyStore.OCR().Add(cltest.DefaultOCRKey))
diff --git a/core/web/p2p_keys_controller_test.go b/core/web/p2p_keys_controller_test.go
index 2eb3e4e95f..4df5f4d91b 100644
--- a/core/web/p2p_keys_controller_test.go
+++ b/core/web/p2p_keys_controller_test.go
@@ -43,7 +43,7 @@ func TestP2PKeysController_Create_HappyPath(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
keyStore := app.GetKeyStore()
response, cleanup := client.Post("/v2/keys/p2p", nil)
@@ -115,7 +115,7 @@ func setupP2PKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, keysto
require.NoError(t, app.KeyStore.OCR().Add(cltest.DefaultOCRKey))
require.NoError(t, app.KeyStore.P2P().Add(cltest.DefaultP2PKey))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
return client, app.GetKeyStore()
}
diff --git a/core/web/ping_controller_test.go b/core/web/ping_controller_test.go
index a8e6c2058f..0040f7dfda 100644
--- a/core/web/ping_controller_test.go
+++ b/core/web/ping_controller_test.go
@@ -22,7 +22,7 @@ func TestPingController_Show_APICredentials(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Get("/v2/ping")
defer cleanup()
diff --git a/core/web/pipeline_runs_controller_test.go b/core/web/pipeline_runs_controller_test.go
index 4637b1836b..8e53384856 100644
--- a/core/web/pipeline_runs_controller_test.go
+++ b/core/web/pipeline_runs_controller_test.go
@@ -69,7 +69,7 @@ func TestPipelineRunsController_CreateWithBody_HappyPath(t *testing.T) {
// Make the request
{
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
body := strings.NewReader(`{"data":{"result":"123.45"}}`)
response, cleanup := client.Post("/v2/jobs/"+uuid.String()+"/runs", body)
defer cleanup()
@@ -130,7 +130,7 @@ func TestPipelineRunsController_CreateNoBody_HappyPath(t *testing.T) {
// Make the request (authorized as user)
{
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
response, cleanup := client.Post("/v2/jobs/"+uuid.String()+"/runs", nil)
defer cleanup()
cltest.AssertServerResponse(t, response, http.StatusOK)
@@ -243,7 +243,7 @@ func TestPipelineRunsController_ShowRun_InvalidID(t *testing.T) {
t.Parallel()
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
response, cleanup := client.Get("/v2/jobs/1/runs/invalid-run-ID")
defer cleanup()
@@ -263,7 +263,7 @@ func setupPipelineRunsControllerTests(t *testing.T) (cltest.HTTPClientCleaner, i
app := cltest.NewApplicationWithConfigAndKey(t, cfg, ethClient, cltest.DefaultP2PKey)
require.NoError(t, app.Start(testutils.Context(t)))
require.NoError(t, app.KeyStore.OCR().Add(cltest.DefaultOCRKey))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
key, _ := cltest.MustInsertRandomKey(t, app.KeyStore.Eth())
diff --git a/core/web/router_test.go b/core/web/router_test.go
index 05d8141f71..424ef4296f 100644
--- a/core/web/router_test.go
+++ b/core/web/router_test.go
@@ -39,7 +39,7 @@ func TestTokenAuthRequired_SessionCredentials(t *testing.T) {
ts := httptest.NewServer(router)
defer ts.Close()
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
resp, cleanup := client.Post("/v2/bridge_types/", nil)
defer cleanup()
diff --git a/core/web/solana_chains_controller_test.go b/core/web/solana_chains_controller_test.go
index e605584080..3112c42856 100644
--- a/core/web/solana_chains_controller_test.go
+++ b/core/web/solana_chains_controller_test.go
@@ -186,7 +186,7 @@ func setupSolanaChainsControllerTestV2(t *testing.T, cfgs ...*solana.SolanaConfi
app := cltest.NewApplicationWithConfig(t, cfg)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
return &TestSolanaChainsController{
app: app,
diff --git a/core/web/solana_keys_controller_test.go b/core/web/solana_keys_controller_test.go
index cd5f70857c..b32a844a39 100644
--- a/core/web/solana_keys_controller_test.go
+++ b/core/web/solana_keys_controller_test.go
@@ -41,7 +41,7 @@ func TestSolanaKeysController_Create_HappyPath(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
keyStore := app.GetKeyStore()
response, cleanup := client.Post("/v2/keys/solana", nil)
@@ -99,7 +99,7 @@ func setupSolanaKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, key
require.NoError(t, app.KeyStore.OCR().Add(cltest.DefaultOCRKey))
require.NoError(t, app.KeyStore.Solana().Add(cltest.DefaultSolanaKey))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
return client, app.GetKeyStore()
}
diff --git a/core/web/starknet_keys_controller_test.go b/core/web/starknet_keys_controller_test.go
index d14216ed4a..c3337e14d2 100644
--- a/core/web/starknet_keys_controller_test.go
+++ b/core/web/starknet_keys_controller_test.go
@@ -41,7 +41,7 @@ func TestStarkNetKeysController_Create_HappyPath(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
keyStore := app.GetKeyStore()
response, cleanup := client.Post("/v2/keys/starknet", nil)
@@ -99,7 +99,7 @@ func setupStarkNetKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, k
require.NoError(t, app.KeyStore.OCR().Add(cltest.DefaultOCRKey))
require.NoError(t, app.KeyStore.StarkNet().Add(cltest.DefaultStarkNetKey))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
return client, app.GetKeyStore()
}
diff --git a/core/web/user_controller_test.go b/core/web/user_controller_test.go
index bde232b1bc..cdb9c9953d 100644
--- a/core/web/user_controller_test.go
+++ b/core/web/user_controller_test.go
@@ -25,7 +25,8 @@ func TestUserController_UpdatePassword(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ u := cltest.User{}
+ client := app.NewHTTPClient(&u)
testCases := []struct {
name string
@@ -56,10 +57,10 @@ func TestUserController_UpdatePassword(t *testing.T) {
},
{
name: "New password includes api email",
- reqBody: fmt.Sprintf(`{"newPassword": "%slonglonglonglong", "oldPassword": "%s"}`, cltest.APIEmailAdmin, cltest.Password),
+ reqBody: fmt.Sprintf(`{"newPassword": "%slonglonglonglong", "oldPassword": "%s"}`, u.Email, cltest.Password),
wantStatusCode: http.StatusUnprocessableEntity,
wantErrCount: 1,
- wantErrMessage: fmt.Sprintf("%s %s\n", utils.ErrMsgHeader, "password may not contain: \"apiuser@chainlink.test\""),
+ wantErrMessage: fmt.Sprintf("%s %s%s\n", utils.ErrMsgHeader, "password may not contain: ", fmt.Sprintf(`"%s"`, u.Email)),
},
{
name: "Success",
@@ -90,7 +91,7 @@ func TestUserController_CreateUser(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
longPassword := strings.Repeat("x", sessions.MaxBcryptPasswordLength+1)
@@ -185,7 +186,8 @@ func TestUserController_UpdateRole(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ u := cltest.User{}
+ client := app.NewHTTPClient(&u)
user := cltest.MustRandomUser(t)
err := app.SessionORM().CreateUser(&user)
require.NoError(t, err)
@@ -232,7 +234,7 @@ func TestUserController_DeleteUser(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
user := cltest.MustRandomUser(t)
err := app.SessionORM().CreateUser(&user)
require.NoError(t, err)
@@ -258,7 +260,7 @@ func TestUserController_NewAPIToken(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
req, err := json.Marshal(sessions.ChangeAuthTokenRequest{
Password: cltest.Password,
})
@@ -280,7 +282,7 @@ func TestUserController_NewAPIToken_unauthorized(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
req, err := json.Marshal(sessions.ChangeAuthTokenRequest{
Password: "wrong-password",
})
@@ -296,7 +298,7 @@ func TestUserController_DeleteAPIKey(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
req, err := json.Marshal(sessions.ChangeAuthTokenRequest{
Password: cltest.Password,
})
@@ -313,7 +315,7 @@ func TestUserController_DeleteAPIKey_unauthorized(t *testing.T) {
app := cltest.NewApplicationEVMDisabled(t)
require.NoError(t, app.Start(testutils.Context(t)))
- client := app.NewHTTPClient(cltest.APIEmailAdmin)
+ client := app.NewHTTPClient(&cltest.User{})
req, err := json.Marshal(sessions.ChangeAuthTokenRequest{
Password: "wrong-password",
})
From 2dcb8276831da96dd187bf1d0ced9c29493832ca Mon Sep 17 00:00:00 2001
From: Chris Cushman <104409744+vreff@users.noreply.github.com>
Date: Tue, 19 Sep 2023 11:33:26 -0400
Subject: [PATCH 23/31] [VRF-618] Fix VRFV2Plus tests with blockhash update
(#10705)
* [VRF-618] Fix VRFV2Plus tests with blockhash update
* prettier
---
.../test/v0.8/foundry/vrf/VRFV2Plus.t.sol | 68 +++++++++----------
1 file changed, 32 insertions(+), 36 deletions(-)
diff --git a/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol b/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol
index 2bfedcc8c1..80a94730ff 100644
--- a/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol
+++ b/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol
@@ -99,8 +99,7 @@ contract VRFV2Plus is BaseTest {
);
}
- // TODO: Fix this test after make foundry-refresh (JIRA ticket VRF-618)
- function skipped_testSetConfig() public {
+ function testSetConfig() public {
// Should setConfig successfully.
setConfig(basicFeeConfig);
(uint16 minConfs, uint32 gasLimit, ) = s_testCoordinator.getRequestConfig();
@@ -116,8 +115,7 @@ contract VRFV2Plus is BaseTest {
s_testCoordinator.setConfig(0, 2_500_000, 1, 50_000, 0, basicFeeConfig);
}
- // TODO: Fix this test after make foundry-refresh
- function skipped_testRegisterProvingKey() public {
+ function testRegisterProvingKey() public {
// Should set the proving key successfully.
registerProvingKey();
(, , bytes32[] memory keyHashes) = s_testCoordinator.getRequestConfig();
@@ -241,8 +239,7 @@ contract VRFV2Plus is BaseTest {
bool success
);
- // TODO: Fix this test after make foundry-refresh (JIRA ticket VRF-618)
- function skipped_testRequestAndFulfillRandomWordsNative() public {
+ function testRequestAndFulfillRandomWordsNative() public {
uint32 requestBlock = 10;
vm.roll(requestBlock);
s_testConsumer.createSubscriptionAndFund(0);
@@ -285,15 +282,15 @@ contract VRFV2Plus is BaseTest {
// Store the previous block's blockhash, and assert that it is as expected.
vm.roll(requestBlock + 1);
s_bhs.store(requestBlock);
- assertEq(hex"c65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8", s_bhs.getBlockhash(requestBlock));
+ assertEq(bytes32(uint256(requestBlock)), s_bhs.getBlockhash(requestBlock));
// Fulfill the request.
// Proof generated via the generate-proof-v2-plus script command. Example usage:
/*
go run . generate-proof-v2-plus \
-key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \
- -pre-seed 53391429126065232382402681707515137895470547057819816488254124798726362946635 \
- -block-hash 0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8 \
+ -pre-seed 93724884573574303181157854277074121673523280784530506403108144933983063023487 \
+ -block-hash 0x000000000000000000000000000000000000000000000000000000000000000a \
-block-num 10 \
-sender 0x90A8820424CC8a819d14cBdE54D12fD3fbFa9bb2 \
-native-payment true
@@ -304,22 +301,22 @@ contract VRFV2Plus is BaseTest {
62070622898698443831883535403436258712770888294397026493185421712108624767191
],
gamma: [
- 2973102176083872659982988645522968133664529102555885971868619302367987919116,
- 43610558806647181042154132372309425100765955827430056035281841579494767100593
+ 51111463251706978184511913295560024261167135799300172382907308330135472647507,
+ 41885656274025752055847945432737871864088659248922821023734315208027501951872
],
- c: 75194344641067036522826220229162084868390366816380211563792760218107272249498,
- s: 108927968992343929608833704938910483045052376946991907425266794689988418576748,
- seed: 53391429126065232382402681707515137895470547057819816488254124798726362946635,
- uWitness: 0x2fF1135666317726951c76126c8723d85CFD9F32,
+ c: 16524568342669389118511849307228542933779732546262509461687493305210182275018,
+ s: 41994650358817457338836417117109954917585544148583960677058620868924739846555,
+ seed: 93724884573574303181157854277074121673523280784530506403108144933983063023487,
+ uWitness: 0x239F36bb6F40B875feDB78A35668ED503714229D,
cGammaWitness: [
- 46085870527299320975519920659984209079990358705974909475473962711525316439739,
- 95523996389945915706780830430209540746261656800207800796591631955877527338163
+ 39509254444382483930263995092200486700241035538419529811079167788988152938775,
+ 45386456067856204990374891906500133027941582609057652148999284389995660222714
],
sHashWitness: [
- 33452562099427047562641801544992972552164940262753954784240667763204805691450,
- 60260251393131215964980682331539706583150315372000173687277509360968942328689
+ 111625720767470372476405191521859549066251564741183518661578940869038469627728,
+ 102482035245447833089088394562631090129269030797203395897444301192092668485625
],
- zInv: 90963680785087352218671937531239943963498221959522740883795298137227163523089
+ zInv: 46854489406365983023053639507653417780777725139199393583659574012051139260916
});
VRFCoordinatorV2Plus.RequestCommitment memory rc = VRFCoordinatorV2Plus.RequestCommitment({
blockNum: requestBlock,
@@ -359,8 +356,7 @@ contract VRFV2Plus is BaseTest {
assertApproxEqAbs(ethBalanceAfter, ethBalanceBefore - 120_000, 10_000);
}
- // TODO: Fix this test after make foundry-refresh (JIRA ticket VRF-618)
- function skipped_testRequestAndFulfillRandomWordsLINK() public {
+ function testRequestAndFulfillRandomWordsLINK() public {
uint32 requestBlock = 20;
vm.roll(requestBlock);
s_linkToken.transfer(address(s_testConsumer), 10 ether);
@@ -403,15 +399,15 @@ contract VRFV2Plus is BaseTest {
// Store the previous block's blockhash, and assert that it is as expected.
vm.roll(requestBlock + 1);
s_bhs.store(requestBlock);
- assertEq(hex"ce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec", s_bhs.getBlockhash(requestBlock));
+ assertEq(bytes32(uint256(requestBlock)), s_bhs.getBlockhash(requestBlock));
// Fulfill the request.
// Proof generated via the generate-proof-v2-plus script command. Example usage:
/*
go run . generate-proof-v2-plus \
-key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \
- -pre-seed 14817911724325909152780695848148728017190840227899344848185245004944693487904 \
- -block-hash 0xce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec \
+ -pre-seed 108233140904510496268355288815996296196427471042093167619305836589216327096601 \
+ -block-hash 0x0000000000000000000000000000000000000000000000000000000000000014 \
-block-num 20 \
-sender 0x90A8820424CC8a819d14cBdE54D12fD3fbFa9bb2
*/
@@ -421,22 +417,22 @@ contract VRFV2Plus is BaseTest {
62070622898698443831883535403436258712770888294397026493185421712108624767191
],
gamma: [
- 33866404953216897461413961842321788789902210776565180957857448351149268461878,
- 115311460432520855364215812517921508651759645277579047898967111537639679255245
+ 49785247270467418393187938018746488660500261614113251546613288843777654841004,
+ 8320717868018488740308781441198484312662094766876176838868269181386589318272
],
- c: 98175725525459014587207855195868784126328401309203602128167819356654355538256,
- s: 78212468144318845248263931834872020573314019987337100119712622816610913379348,
- seed: 14817911724325909152780695848148728017190840227899344848185245004944693487904,
- uWitness: 0xA98F604595c018ca3A897a89A93335C4D9736200,
+ c: 76453805415479914665188560136648688491255275134351022531196270897692316685243,
+ s: 22475315809542512110111038532919582593833813393763591614796010376988981373422,
+ seed: 108233140904510496268355288815996296196427471042093167619305836589216327096601,
+ uWitness: 0x5FEaCA3fb4754440E6a2A9954FC9239C598575D6,
cGammaWitness: [
- 89663557576172659880527012694290366148297911460143038889658956042430644586923,
- 29419553942575420255373719124720052624389851192491471135797878382964991183413
+ 55445396003779478156538753672495726993840482493921680192868130506843942678541,
+ 106319974075683500018668841039963899149060186085112051787355016812064025102025
],
sHashWitness: [
- 108049980454753981965039838334334363963059423646097861676439703242702207924520,
- 30630879728902862732102533191211056668896962900771600171010644651087695869520
+ 34533061775486739812426491689767238316751877347882380297143821485918957938090,
+ 2922713080913931101723342979079557154957284247074698150345640807351459691338
],
- zInv: 20922890987701239032692501385659950984080522095093996771712575172616647361477
+ zInv: 5351690486803355464662962731889988792533544566214255216629618109252893229562
});
VRFCoordinatorV2Plus.RequestCommitment memory rc = VRFCoordinatorV2Plus.RequestCommitment({
blockNum: requestBlock,
From ebbd97202cff641885867cfe742573549e582eb9 Mon Sep 17 00:00:00 2001
From: Sam
Date: Tue, 19 Sep 2023 12:01:33 -0400
Subject: [PATCH 24/31] Bump libocr => dbd4e505b3e6fe6564150a71d61302fffc7fd0bc
(#10691)
---
core/scripts/go.mod | 4 ++--
core/scripts/go.sum | 8 ++++----
go.mod | 4 ++--
go.sum | 8 ++++----
integration-tests/go.mod | 4 ++--
integration-tests/go.sum | 8 ++++----
6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/core/scripts/go.mod b/core/scripts/go.mod
index 5e7f26011f..bd2dd3d385 100644
--- a/core/scripts/go.mod
+++ b/core/scripts/go.mod
@@ -18,8 +18,8 @@ require (
github.com/pelletier/go-toml/v2 v2.0.9
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
- github.com/smartcontractkit/libocr v0.0.0-20230816220705-665e93233ae5
- github.com/smartcontractkit/ocr2keepers v0.7.23
+ github.com/smartcontractkit/libocr v0.0.0-20230918212407-dbd4e505b3e6
+ github.com/smartcontractkit/ocr2keepers v0.7.24
github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687
github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb
github.com/spf13/cobra v1.6.1
diff --git a/core/scripts/go.sum b/core/scripts/go.sum
index 54f5d507cf..35eff06a08 100644
--- a/core/scripts/go.sum
+++ b/core/scripts/go.sum
@@ -1387,10 +1387,10 @@ github.com/smartcontractkit/go-plugin v0.0.0-20230605132010-0f4d515d1472 h1:x3kN
github.com/smartcontractkit/go-plugin v0.0.0-20230605132010-0f4d515d1472/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0=
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-20230816220705-665e93233ae5 h1:rzbqGoScs9VHGnyCKF7AoQEuUfwJnzcKmGIfaczeanA=
-github.com/smartcontractkit/libocr v0.0.0-20230816220705-665e93233ae5/go.mod h1:2lyRkw/qLQgUWlrWWmq5nj0y90rWeO6Y+v+fCakRgb0=
-github.com/smartcontractkit/ocr2keepers v0.7.23 h1:hvMCHm9zTOKGELc40n+JLGmbiW1tkFnHW17qAtoVews=
-github.com/smartcontractkit/ocr2keepers v0.7.23/go.mod h1:AjcIEKeNnU7NRlvnuMCTjBIQ1kpW0YHhlFdeDa/3hs0=
+github.com/smartcontractkit/libocr v0.0.0-20230918212407-dbd4e505b3e6 h1:w+8TI2Vcm3vk8XQz40ddcwy9BNZgoakXIby35Y54iDU=
+github.com/smartcontractkit/libocr v0.0.0-20230918212407-dbd4e505b3e6/go.mod h1:2lyRkw/qLQgUWlrWWmq5nj0y90rWeO6Y+v+fCakRgb0=
+github.com/smartcontractkit/ocr2keepers v0.7.24 h1:d1HcCpsBcBSC9MC9qdjzsm/NSAnnavcZAvAqPAAa75Q=
+github.com/smartcontractkit/ocr2keepers v0.7.24/go.mod h1:4e1ZDRz7fpLgcRUjJpq+5mkoD0ga11BxrSp2JTWKADQ=
github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687 h1:NwC3SOc25noBTe1KUQjt45fyTIuInhoE2UfgcHAdihM=
github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687/go.mod h1:YYZq52t4wcHoMQeITksYsorD+tZcOyuVU5+lvot3VFM=
github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb h1:OMaBUb4X9IFPLbGbCHsMU+kw/BPCrewaVwWGIBc0I4A=
diff --git a/go.mod b/go.mod
index 73e71154aa..f4375fe5bd 100644
--- a/go.mod
+++ b/go.mod
@@ -70,8 +70,8 @@ require (
github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230918212835-8a0b08df72a3
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918
- github.com/smartcontractkit/libocr v0.0.0-20230816220705-665e93233ae5
- github.com/smartcontractkit/ocr2keepers v0.7.23
+ github.com/smartcontractkit/libocr v0.0.0-20230918212407-dbd4e505b3e6
+ github.com/smartcontractkit/ocr2keepers v0.7.24
github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687
github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1
diff --git a/go.sum b/go.sum
index b8437fdb66..767a7abcf3 100644
--- a/go.sum
+++ b/go.sum
@@ -1387,10 +1387,10 @@ github.com/smartcontractkit/go-plugin v0.0.0-20230605132010-0f4d515d1472 h1:x3kN
github.com/smartcontractkit/go-plugin v0.0.0-20230605132010-0f4d515d1472/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0=
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-20230816220705-665e93233ae5 h1:rzbqGoScs9VHGnyCKF7AoQEuUfwJnzcKmGIfaczeanA=
-github.com/smartcontractkit/libocr v0.0.0-20230816220705-665e93233ae5/go.mod h1:2lyRkw/qLQgUWlrWWmq5nj0y90rWeO6Y+v+fCakRgb0=
-github.com/smartcontractkit/ocr2keepers v0.7.23 h1:hvMCHm9zTOKGELc40n+JLGmbiW1tkFnHW17qAtoVews=
-github.com/smartcontractkit/ocr2keepers v0.7.23/go.mod h1:AjcIEKeNnU7NRlvnuMCTjBIQ1kpW0YHhlFdeDa/3hs0=
+github.com/smartcontractkit/libocr v0.0.0-20230918212407-dbd4e505b3e6 h1:w+8TI2Vcm3vk8XQz40ddcwy9BNZgoakXIby35Y54iDU=
+github.com/smartcontractkit/libocr v0.0.0-20230918212407-dbd4e505b3e6/go.mod h1:2lyRkw/qLQgUWlrWWmq5nj0y90rWeO6Y+v+fCakRgb0=
+github.com/smartcontractkit/ocr2keepers v0.7.24 h1:d1HcCpsBcBSC9MC9qdjzsm/NSAnnavcZAvAqPAAa75Q=
+github.com/smartcontractkit/ocr2keepers v0.7.24/go.mod h1:4e1ZDRz7fpLgcRUjJpq+5mkoD0ga11BxrSp2JTWKADQ=
github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687 h1:NwC3SOc25noBTe1KUQjt45fyTIuInhoE2UfgcHAdihM=
github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687/go.mod h1:YYZq52t4wcHoMQeITksYsorD+tZcOyuVU5+lvot3VFM=
github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb h1:OMaBUb4X9IFPLbGbCHsMU+kw/BPCrewaVwWGIBc0I4A=
diff --git a/integration-tests/go.mod b/integration-tests/go.mod
index badb58db97..88b24cc8eb 100644
--- a/integration-tests/go.mod
+++ b/integration-tests/go.mod
@@ -22,8 +22,8 @@ require (
github.com/smartcontractkit/chainlink-env v0.36.0
github.com/smartcontractkit/chainlink-testing-framework v1.17.0
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
- github.com/smartcontractkit/libocr v0.0.0-20230816220705-665e93233ae5
- github.com/smartcontractkit/ocr2keepers v0.7.23
+ github.com/smartcontractkit/libocr v0.0.0-20230918212407-dbd4e505b3e6
+ github.com/smartcontractkit/ocr2keepers v0.7.24
github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1
github.com/smartcontractkit/wasp v0.3.0
diff --git a/integration-tests/go.sum b/integration-tests/go.sum
index 59ca87f752..e0edb10ec5 100644
--- a/integration-tests/go.sum
+++ b/integration-tests/go.sum
@@ -2264,10 +2264,10 @@ github.com/smartcontractkit/go-plugin v0.0.0-20230605132010-0f4d515d1472 h1:x3kN
github.com/smartcontractkit/go-plugin v0.0.0-20230605132010-0f4d515d1472/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0=
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-20230816220705-665e93233ae5 h1:rzbqGoScs9VHGnyCKF7AoQEuUfwJnzcKmGIfaczeanA=
-github.com/smartcontractkit/libocr v0.0.0-20230816220705-665e93233ae5/go.mod h1:2lyRkw/qLQgUWlrWWmq5nj0y90rWeO6Y+v+fCakRgb0=
-github.com/smartcontractkit/ocr2keepers v0.7.23 h1:hvMCHm9zTOKGELc40n+JLGmbiW1tkFnHW17qAtoVews=
-github.com/smartcontractkit/ocr2keepers v0.7.23/go.mod h1:AjcIEKeNnU7NRlvnuMCTjBIQ1kpW0YHhlFdeDa/3hs0=
+github.com/smartcontractkit/libocr v0.0.0-20230918212407-dbd4e505b3e6 h1:w+8TI2Vcm3vk8XQz40ddcwy9BNZgoakXIby35Y54iDU=
+github.com/smartcontractkit/libocr v0.0.0-20230918212407-dbd4e505b3e6/go.mod h1:2lyRkw/qLQgUWlrWWmq5nj0y90rWeO6Y+v+fCakRgb0=
+github.com/smartcontractkit/ocr2keepers v0.7.24 h1:d1HcCpsBcBSC9MC9qdjzsm/NSAnnavcZAvAqPAAa75Q=
+github.com/smartcontractkit/ocr2keepers v0.7.24/go.mod h1:4e1ZDRz7fpLgcRUjJpq+5mkoD0ga11BxrSp2JTWKADQ=
github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687 h1:NwC3SOc25noBTe1KUQjt45fyTIuInhoE2UfgcHAdihM=
github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687/go.mod h1:YYZq52t4wcHoMQeITksYsorD+tZcOyuVU5+lvot3VFM=
github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb h1:OMaBUb4X9IFPLbGbCHsMU+kw/BPCrewaVwWGIBc0I4A=
From df9c4996a38e5f2d7bd8089053c48613b3846128 Mon Sep 17 00:00:00 2001
From: Akshay Aggarwal
Date: Tue, 19 Sep 2023 19:51:56 +0100
Subject: [PATCH 25/31] Increase default ocr2 automation gas limit to 14.5M
(#10706)
* Increase default ocr2 automation gas limit to 14.5M
* make docs
* insert new line
---
core/chains/evm/config/toml/defaults/Arbitrum_Goerli.toml | 3 +++
core/chains/evm/config/toml/defaults/Arbitrum_Mainnet.toml | 3 +++
docs/CONFIG.md | 4 ++--
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/core/chains/evm/config/toml/defaults/Arbitrum_Goerli.toml b/core/chains/evm/config/toml/defaults/Arbitrum_Goerli.toml
index a2c710265c..598b571352 100644
--- a/core/chains/evm/config/toml/defaults/Arbitrum_Goerli.toml
+++ b/core/chains/evm/config/toml/defaults/Arbitrum_Goerli.toml
@@ -22,3 +22,6 @@ BlockHistorySize = 0
[NodePool]
SyncThreshold = 10
+
+[OCR2.Automation]
+GasLimit = 14500000
diff --git a/core/chains/evm/config/toml/defaults/Arbitrum_Mainnet.toml b/core/chains/evm/config/toml/defaults/Arbitrum_Mainnet.toml
index 55ceef406c..350d15cfcc 100644
--- a/core/chains/evm/config/toml/defaults/Arbitrum_Mainnet.toml
+++ b/core/chains/evm/config/toml/defaults/Arbitrum_Mainnet.toml
@@ -24,3 +24,6 @@ BlockHistorySize = 0
[NodePool]
SyncThreshold = 10
+
+[OCR2.Automation]
+GasLimit = 14500000
diff --git a/docs/CONFIG.md b/docs/CONFIG.md
index f956d14c7a..ceb3d3dfe0 100644
--- a/docs/CONFIG.md
+++ b/docs/CONFIG.md
@@ -3371,7 +3371,7 @@ ObservationGracePeriod = '1s'
[OCR2]
[OCR2.Automation]
-GasLimit = 5300000
+GasLimit = 14500000
```
@@ -3997,7 +3997,7 @@ ObservationGracePeriod = '1s'
[OCR2]
[OCR2.Automation]
-GasLimit = 5300000
+GasLimit = 14500000
```
From af1f6e7efd04e7a300746b418923744969a57489 Mon Sep 17 00:00:00 2001
From: Austin Born
Date: Tue, 19 Sep 2023 13:06:45 -0700
Subject: [PATCH 26/31] Verify with single payment token (#10603)
* Flip fee tokens in report decoding
* Use array of quotePayload
* Update interface to single quote payload
* Passing tests
* Gas snapshot update
* Update go gen files
* Update integration test interfaces
* Prettify
* Update snapshot
* Change second parameter name to parameterPayload
* Prettier
* feePayload -> parameterPayload in integration tests
---
.../gas-snapshots/llo-feeds.gas-snapshot | 263 +++++++++---------
.../src/v0.8/llo-feeds/VerifierProxy.sol | 14 +-
.../src/v0.8/llo-feeds/dev/FeeManager.sol | 39 +--
.../llo-feeds/dev/interfaces/IFeeManager.sol | 4 +-
.../dev/interfaces/IVerifierFeeManager.sol | 14 +-
.../llo-feeds/interfaces/IVerifierProxy.sol | 16 +-
.../test/fee-manager/BaseFeeManager.t.sol | 70 ++---
.../test/fee-manager/FeeManager.general.t.sol | 26 +-
.../FeeManager.getFeeAndReward.t.sol | 62 ++---
.../fee-manager/FeeManager.processFee.t.sol | 120 ++++----
.../FeeManager.processFeeBulk.t.sol | 136 +++------
.../llo-feeds/test/gas/Gas_VerifierTest.t.sol | 36 ++-
.../llo-feeds/test/mocks/FeeManagerProxy.sol | 8 +-
.../test/verifier/BaseVerifierTest.t.sol | 27 +-
.../verifier/VerifierActivateConfigTest.t.sol | 2 +-
.../verifier/VerifierDeactivateFeedTest.t.sol | 8 +-
.../verifier/VerifierTestBillingReport.t.sol | 199 +++----------
.../test/verifier/VerifierVerifyTest.t.sol | 46 +--
.../generated/fee_manager/fee_manager.go | 50 ++--
.../verifier_proxy/verifier_proxy.go | 32 +--
...rapper-dependency-versions-do-not-edit.txt | 4 +-
.../contracts/contract_models.go | 4 +-
.../contracts/ethereum_contracts.go | 8 +-
23 files changed, 497 insertions(+), 691 deletions(-)
diff --git a/contracts/gas-snapshots/llo-feeds.gas-snapshot b/contracts/gas-snapshots/llo-feeds.gas-snapshot
index fc8b0937d1..563a2b0200 100644
--- a/contracts/gas-snapshots/llo-feeds.gas-snapshot
+++ b/contracts/gas-snapshots/llo-feeds.gas-snapshot
@@ -1,95 +1,93 @@
-FeeManagerProcessFeeTest:test_DiscountIsAppliedForNative() (gas: 52634)
-FeeManagerProcessFeeTest:test_DiscountIsReturnedForNative() (gas: 52566)
-FeeManagerProcessFeeTest:test_DiscountIsReturnedForNativeWithSurcharge() (gas: 78747)
-FeeManagerProcessFeeTest:test_V1PayloadVerifies() (gas: 25961)
-FeeManagerProcessFeeTest:test_V1PayloadVerifiesAndReturnsChange() (gas: 57252)
-FeeManagerProcessFeeTest:test_V2PayloadVerifies() (gas: 118212)
-FeeManagerProcessFeeTest:test_V2PayloadWithoutQuoteFails() (gas: 28568)
-FeeManagerProcessFeeTest:test_V2PayloadWithoutZeroFee() (gas: 72524)
-FeeManagerProcessFeeTest:test_WithdrawERC20() (gas: 71648)
-FeeManagerProcessFeeTest:test_WithdrawNonAdminAddr() (gas: 56270)
+FeeManagerProcessFeeTest:test_DiscountIsAppliedForNative() (gas: 52282)
+FeeManagerProcessFeeTest:test_DiscountIsReturnedForNative() (gas: 52235)
+FeeManagerProcessFeeTest:test_DiscountIsReturnedForNativeWithSurcharge() (gas: 78440)
+FeeManagerProcessFeeTest:test_V1PayloadVerifies() (gas: 26980)
+FeeManagerProcessFeeTest:test_V1PayloadVerifiesAndReturnsChange() (gas: 57895)
+FeeManagerProcessFeeTest:test_V2PayloadVerifies() (gas: 116092)
+FeeManagerProcessFeeTest:test_V2PayloadWithoutQuoteFails() (gas: 27395)
+FeeManagerProcessFeeTest:test_V2PayloadWithoutZeroFee() (gas: 70368)
+FeeManagerProcessFeeTest:test_WithdrawERC20() (gas: 71617)
+FeeManagerProcessFeeTest:test_WithdrawNonAdminAddr() (gas: 56261)
FeeManagerProcessFeeTest:test_WithdrawUnwrappedNative() (gas: 25322)
-FeeManagerProcessFeeTest:test_baseFeeIsAppliedForLink() (gas: 14623)
-FeeManagerProcessFeeTest:test_baseFeeIsAppliedForNative() (gas: 17581)
-FeeManagerProcessFeeTest:test_correctDiscountIsAppliedWhenBothTokensAreDiscounted() (gas: 90945)
-FeeManagerProcessFeeTest:test_discountAIsNotAppliedWhenSetForOtherUsers() (gas: 56524)
-FeeManagerProcessFeeTest:test_discountFeeRoundsDownWhenUneven() (gas: 52803)
-FeeManagerProcessFeeTest:test_discountIsAppliedForLink() (gas: 49627)
-FeeManagerProcessFeeTest:test_discountIsAppliedWith100PercentSurcharge() (gas: 78795)
-FeeManagerProcessFeeTest:test_discountIsNoLongerAppliedAfterRemoving() (gas: 46428)
-FeeManagerProcessFeeTest:test_discountIsNotAppliedForInvalidTokenAddress() (gas: 17568)
-FeeManagerProcessFeeTest:test_discountIsNotAppliedToOtherFeeds() (gas: 54571)
-FeeManagerProcessFeeTest:test_discountIsReturnedForLink() (gas: 49581)
-FeeManagerProcessFeeTest:test_emptyQuoteRevertsWithError() (gas: 11525)
-FeeManagerProcessFeeTest:test_eventIsEmittedAfterSurchargeIsSet() (gas: 41390)
-FeeManagerProcessFeeTest:test_eventIsEmittedIfNotEnoughLink() (gas: 259493)
-FeeManagerProcessFeeTest:test_eventIsEmittedUponWithdraw() (gas: 68996)
-FeeManagerProcessFeeTest:test_feeIsUpdatedAfterDiscountIsRemoved() (gas: 49706)
-FeeManagerProcessFeeTest:test_feeIsUpdatedAfterNewDiscountIsApplied() (gas: 67635)
-FeeManagerProcessFeeTest:test_feeIsUpdatedAfterNewSurchargeIsApplied() (gas: 64188)
-FeeManagerProcessFeeTest:test_feeIsZeroWith100PercentDiscount() (gas: 52012)
-FeeManagerProcessFeeTest:test_getBaseRewardWithLinkQuote() (gas: 14621)
-FeeManagerProcessFeeTest:test_getLinkFeeIsRoundedUp() (gas: 49774)
-FeeManagerProcessFeeTest:test_getLinkRewardIsSameAsFee() (gas: 55561)
-FeeManagerProcessFeeTest:test_getLinkRewardWithNativeQuoteAndSurchargeWithLinkDiscount() (gas: 82680)
-FeeManagerProcessFeeTest:test_getRewardWithLinkDiscount() (gas: 49602)
-FeeManagerProcessFeeTest:test_getRewardWithLinkQuoteAndLinkDiscount() (gas: 49604)
-FeeManagerProcessFeeTest:test_getRewardWithNativeQuote() (gas: 17601)
-FeeManagerProcessFeeTest:test_getRewardWithNativeQuoteAndSurcharge() (gas: 50804)
-FeeManagerProcessFeeTest:test_linkAvailableForPaymentReturnsLinkBalance() (gas: 52375)
-FeeManagerProcessFeeTest:test_nativeSurcharge0Percent() (gas: 30792)
-FeeManagerProcessFeeTest:test_nativeSurcharge100Percent() (gas: 50805)
-FeeManagerProcessFeeTest:test_nativeSurchargeCannotExceed100Percent() (gas: 17144)
-FeeManagerProcessFeeTest:test_nativeSurchargeEventIsEmittedOnUpdate() (gas: 41348)
-FeeManagerProcessFeeTest:test_noFeeIsAppliedWhenReportHasZeroFee() (gas: 51879)
-FeeManagerProcessFeeTest:test_noFeeIsAppliedWhenReportHasZeroFeeAndDiscountAndSurchargeIsSet() (gas: 78040)
-FeeManagerProcessFeeTest:test_nonAdminProxyUserCannotProcessFee() (gas: 21892)
-FeeManagerProcessFeeTest:test_nonAdminUserCanNotSetDiscount() (gas: 19836)
-FeeManagerProcessFeeTest:test_payLinkDeficit() (gas: 195540)
-FeeManagerProcessFeeTest:test_payLinkDeficitOnlyCallableByAdmin() (gas: 17360)
-FeeManagerProcessFeeTest:test_payLinkDeficitPaysAllFeesProcessed() (gas: 216745)
-FeeManagerProcessFeeTest:test_payLinkDeficitTwice() (gas: 199838)
-FeeManagerProcessFeeTest:test_processFeeAsProxy() (gas: 118584)
-FeeManagerProcessFeeTest:test_processFeeDefaultReportsStillVerifiesWithEmptyQuote() (gas: 26811)
-FeeManagerProcessFeeTest:test_processFeeEmitsEventIfNotEnoughLink() (gas: 163961)
-FeeManagerProcessFeeTest:test_processFeeIfSubscriberIsSelf() (gas: 27362)
-FeeManagerProcessFeeTest:test_processFeeNative() (gas: 174582)
-FeeManagerProcessFeeTest:test_processFeeUsesCorrectDigest() (gas: 119544)
-FeeManagerProcessFeeTest:test_processFeeWithDefaultReportPayloadAndQuoteStillVerifies() (gas: 29175)
-FeeManagerProcessFeeTest:test_processFeeWithDiscountEmitsEvent() (gas: 244325)
-FeeManagerProcessFeeTest:test_processFeeWithInvalidReportVersionFailsToDecode() (gas: 30610)
-FeeManagerProcessFeeTest:test_processFeeWithNoDiscountDoesNotEmitEvent() (gas: 168499)
-FeeManagerProcessFeeTest:test_processFeeWithUnwrappedNative() (gas: 182134)
-FeeManagerProcessFeeTest:test_processFeeWithUnwrappedNativeLinkAddress() (gas: 133630)
-FeeManagerProcessFeeTest:test_processFeeWithUnwrappedNativeLinkAddressExcessiveFee() (gas: 157517)
-FeeManagerProcessFeeTest:test_processFeeWithUnwrappedNativeShortFunds() (gas: 94743)
-FeeManagerProcessFeeTest:test_processFeeWithUnwrappedNativeWithExcessiveFee() (gas: 189072)
-FeeManagerProcessFeeTest:test_processFeeWithWithCorruptQuotePayload() (gas: 28473)
-FeeManagerProcessFeeTest:test_processFeeWithWithEmptyQuotePayload() (gas: 28919)
-FeeManagerProcessFeeTest:test_processFeeWithWithZeroQuotePayload() (gas: 29914)
-FeeManagerProcessFeeTest:test_processFeeWithZeroLinkNonZeroNativeWithLinkQuote() (gas: 35154)
-FeeManagerProcessFeeTest:test_processFeeWithZeroLinkNonZeroNativeWithNativeQuote() (gas: 154471)
-FeeManagerProcessFeeTest:test_processFeeWithZeroNativeNonZeroLinkReturnsChange() (gas: 55617)
-FeeManagerProcessFeeTest:test_processFeeWithZeroNativeNonZeroLinkWithLinkQuote() (gas: 118485)
-FeeManagerProcessFeeTest:test_processFeeWithZeroNativeNonZeroLinkWithNativeQuote() (gas: 37856)
-FeeManagerProcessFeeTest:test_processMultipleLinkAndNativeUnwrappedReports() (gas: 295090)
-FeeManagerProcessFeeTest:test_processMultipleLinkAndNativeWrappedReports() (gas: 278332)
-FeeManagerProcessFeeTest:test_processMultipleLinkReports() (gas: 235123)
-FeeManagerProcessFeeTest:test_processMultipleUnwrappedNativeReports() (gas: 268893)
-FeeManagerProcessFeeTest:test_processMultipleV1Reports() (gas: 71442)
-FeeManagerProcessFeeTest:test_processMultipleWrappedNativeReports() (gas: 252024)
-FeeManagerProcessFeeTest:test_processV1V2V3Reports() (gas: 282386)
-FeeManagerProcessFeeTest:test_processV1V2V3ReportsWithUnwrapped() (gas: 299112)
-FeeManagerProcessFeeTest:test_reportWithNoExpiryOrFeeReturnsZero() (gas: 11038)
+FeeManagerProcessFeeTest:test_baseFeeIsAppliedForLink() (gas: 14345)
+FeeManagerProcessFeeTest:test_baseFeeIsAppliedForNative() (gas: 17279)
+FeeManagerProcessFeeTest:test_correctDiscountIsAppliedWhenBothTokensAreDiscounted() (gas: 90285)
+FeeManagerProcessFeeTest:test_discountAIsNotAppliedWhenSetForOtherUsers() (gas: 56171)
+FeeManagerProcessFeeTest:test_discountFeeRoundsDownWhenUneven() (gas: 52482)
+FeeManagerProcessFeeTest:test_discountIsAppliedForLink() (gas: 49277)
+FeeManagerProcessFeeTest:test_discountIsAppliedWith100PercentSurcharge() (gas: 78530)
+FeeManagerProcessFeeTest:test_discountIsNoLongerAppliedAfterRemoving() (gas: 45936)
+FeeManagerProcessFeeTest:test_discountIsNotAppliedForInvalidTokenAddress() (gas: 17546)
+FeeManagerProcessFeeTest:test_discountIsNotAppliedToOtherFeeds() (gas: 54241)
+FeeManagerProcessFeeTest:test_discountIsReturnedForLink() (gas: 49252)
+FeeManagerProcessFeeTest:test_emptyQuoteRevertsWithError() (gas: 11286)
+FeeManagerProcessFeeTest:test_eventIsEmittedAfterSurchargeIsSet() (gas: 41348)
+FeeManagerProcessFeeTest:test_eventIsEmittedIfNotEnoughLink() (gas: 172711)
+FeeManagerProcessFeeTest:test_eventIsEmittedUponWithdraw() (gas: 68984)
+FeeManagerProcessFeeTest:test_feeIsUpdatedAfterDiscountIsRemoved() (gas: 49176)
+FeeManagerProcessFeeTest:test_feeIsUpdatedAfterNewDiscountIsApplied() (gas: 66973)
+FeeManagerProcessFeeTest:test_feeIsUpdatedAfterNewSurchargeIsApplied() (gas: 63650)
+FeeManagerProcessFeeTest:test_feeIsZeroWith100PercentDiscount() (gas: 51682)
+FeeManagerProcessFeeTest:test_getBaseRewardWithLinkQuote() (gas: 14362)
+FeeManagerProcessFeeTest:test_getLinkFeeIsRoundedUp() (gas: 49468)
+FeeManagerProcessFeeTest:test_getLinkRewardIsSameAsFee() (gas: 54932)
+FeeManagerProcessFeeTest:test_getLinkRewardWithNativeQuoteAndSurchargeWithLinkDiscount() (gas: 82394)
+FeeManagerProcessFeeTest:test_getRewardWithLinkDiscount() (gas: 49295)
+FeeManagerProcessFeeTest:test_getRewardWithLinkQuoteAndLinkDiscount() (gas: 49298)
+FeeManagerProcessFeeTest:test_getRewardWithNativeQuote() (gas: 17299)
+FeeManagerProcessFeeTest:test_getRewardWithNativeQuoteAndSurcharge() (gas: 50481)
+FeeManagerProcessFeeTest:test_linkAvailableForPaymentReturnsLinkBalance() (gas: 52419)
+FeeManagerProcessFeeTest:test_nativeSurcharge0Percent() (gas: 30491)
+FeeManagerProcessFeeTest:test_nativeSurcharge100Percent() (gas: 50504)
+FeeManagerProcessFeeTest:test_nativeSurchargeCannotExceed100Percent() (gas: 17167)
+FeeManagerProcessFeeTest:test_nativeSurchargeEventIsEmittedOnUpdate() (gas: 41394)
+FeeManagerProcessFeeTest:test_noFeeIsAppliedWhenReportHasZeroFee() (gas: 51505)
+FeeManagerProcessFeeTest:test_noFeeIsAppliedWhenReportHasZeroFeeAndDiscountAndSurchargeIsSet() (gas: 77733)
+FeeManagerProcessFeeTest:test_nonAdminProxyUserCannotProcessFee() (gas: 21881)
+FeeManagerProcessFeeTest:test_nonAdminUserCanNotSetDiscount() (gas: 19835)
+FeeManagerProcessFeeTest:test_payLinkDeficit() (gas: 193856)
+FeeManagerProcessFeeTest:test_payLinkDeficitOnlyCallableByAdmin() (gas: 17405)
+FeeManagerProcessFeeTest:test_payLinkDeficitPaysAllFeesProcessed() (gas: 213891)
+FeeManagerProcessFeeTest:test_payLinkDeficitTwice() (gas: 198224)
+FeeManagerProcessFeeTest:test_processFeeAsProxy() (gas: 116430)
+FeeManagerProcessFeeTest:test_processFeeDefaultReportsStillVerifiesWithEmptyQuote() (gas: 27468)
+FeeManagerProcessFeeTest:test_processFeeEmitsEventIfNotEnoughLink() (gas: 161837)
+FeeManagerProcessFeeTest:test_processFeeIfSubscriberIsSelf() (gas: 27822)
+FeeManagerProcessFeeTest:test_processFeeNative() (gas: 172458)
+FeeManagerProcessFeeTest:test_processFeeUsesCorrectDigest() (gas: 117390)
+FeeManagerProcessFeeTest:test_processFeeWithDefaultReportPayloadAndQuoteStillVerifies() (gas: 29542)
+FeeManagerProcessFeeTest:test_processFeeWithDiscountEmitsEvent() (gas: 241269)
+FeeManagerProcessFeeTest:test_processFeeWithInvalidReportVersionFailsToDecode() (gas: 28517)
+FeeManagerProcessFeeTest:test_processFeeWithNoDiscountDoesNotEmitEvent() (gas: 166400)
+FeeManagerProcessFeeTest:test_processFeeWithUnwrappedNative() (gas: 179992)
+FeeManagerProcessFeeTest:test_processFeeWithUnwrappedNativeLinkAddress() (gas: 131459)
+FeeManagerProcessFeeTest:test_processFeeWithUnwrappedNativeLinkAddressExcessiveFee() (gas: 155388)
+FeeManagerProcessFeeTest:test_processFeeWithUnwrappedNativeShortFunds() (gas: 92624)
+FeeManagerProcessFeeTest:test_processFeeWithUnwrappedNativeWithExcessiveFee() (gas: 186953)
+FeeManagerProcessFeeTest:test_processFeeWithWithCorruptQuotePayload() (gas: 70679)
+FeeManagerProcessFeeTest:test_processFeeWithWithEmptyQuotePayload() (gas: 27733)
+FeeManagerProcessFeeTest:test_processFeeWithWithZeroQuotePayload() (gas: 27783)
+FeeManagerProcessFeeTest:test_processFeeWithZeroLinkNonZeroNativeWithLinkQuote() (gas: 32971)
+FeeManagerProcessFeeTest:test_processFeeWithZeroLinkNonZeroNativeWithNativeQuote() (gas: 152357)
+FeeManagerProcessFeeTest:test_processFeeWithZeroNativeNonZeroLinkReturnsChange() (gas: 53468)
+FeeManagerProcessFeeTest:test_processFeeWithZeroNativeNonZeroLinkWithLinkQuote() (gas: 116341)
+FeeManagerProcessFeeTest:test_processFeeWithZeroNativeNonZeroLinkWithNativeQuote() (gas: 35738)
+FeeManagerProcessFeeTest:test_processMultipleLinkReports() (gas: 221457)
+FeeManagerProcessFeeTest:test_processMultipleUnwrappedNativeReports() (gas: 255272)
+FeeManagerProcessFeeTest:test_processMultipleV1Reports() (gas: 74135)
+FeeManagerProcessFeeTest:test_processMultipleWrappedNativeReports() (gas: 238399)
+FeeManagerProcessFeeTest:test_processV1V2V3Reports() (gas: 206219)
+FeeManagerProcessFeeTest:test_processV1V2V3ReportsWithUnwrapped() (gas: 247873)
+FeeManagerProcessFeeTest:test_reportWithNoExpiryOrFeeReturnsZero() (gas: 10770)
FeeManagerProcessFeeTest:test_setDiscountOver100Percent() (gas: 19548)
-FeeManagerProcessFeeTest:test_subscriberDiscountEventIsEmittedOnUpdate() (gas: 46281)
-FeeManagerProcessFeeTest:test_surchargeFeeRoundsUpWhenUneven() (gas: 51135)
-FeeManagerProcessFeeTest:test_surchargeIsApplied() (gas: 51060)
-FeeManagerProcessFeeTest:test_surchargeIsAppliedForNativeFeeWithDiscount() (gas: 79214)
-FeeManagerProcessFeeTest:test_surchargeIsNoLongerAppliedAfterRemoving() (gas: 46968)
-FeeManagerProcessFeeTest:test_surchargeIsNotAppliedForLinkFee() (gas: 49840)
-FeeManagerProcessFeeTest:test_surchargeIsNotAppliedWith100PercentDiscount() (gas: 78211)
-FeeManagerProcessFeeTest:test_testRevertIfReportHasExpired() (gas: 14383)
+FeeManagerProcessFeeTest:test_subscriberDiscountEventIsEmittedOnUpdate() (gas: 46259)
+FeeManagerProcessFeeTest:test_surchargeFeeRoundsUpWhenUneven() (gas: 50856)
+FeeManagerProcessFeeTest:test_surchargeIsApplied() (gas: 50737)
+FeeManagerProcessFeeTest:test_surchargeIsAppliedForNativeFeeWithDiscount() (gas: 78892)
+FeeManagerProcessFeeTest:test_surchargeIsNoLongerAppliedAfterRemoving() (gas: 46503)
+FeeManagerProcessFeeTest:test_surchargeIsNotAppliedForLinkFee() (gas: 49585)
+FeeManagerProcessFeeTest:test_surchargeIsNotAppliedWith100PercentDiscount() (gas: 77890)
+FeeManagerProcessFeeTest:test_testRevertIfReportHasExpired() (gas: 14042)
RewardManagerClaimTest:test_claimAllRecipients() (gas: 275763)
RewardManagerClaimTest:test_claimMultipleRecipients() (gas: 153306)
RewardManagerClaimTest:test_claimRewardsWithDuplicatePoolIdsDoesNotPayoutTwice() (gas: 328345)
@@ -182,65 +180,62 @@ VerifierActivateFeedTest:test_revertsIfNoFeedExistsActivate() (gas: 13179)
VerifierActivateFeedTest:test_revertsIfNoFeedExistsDeactivate() (gas: 13157)
VerifierActivateFeedTest:test_revertsIfNotOwnerActivateFeed() (gas: 17098)
VerifierActivateFeedTest:test_revertsIfNotOwnerDeactivateFeed() (gas: 17153)
-VerifierBulkVerifyBillingReport:test_verifyBulkReportWithUnwrappedAndWrappedNativeDefaultsToUnwrapped() (gas: 391401)
-VerifierBulkVerifyBillingReport:test_verifyBulkWithLinkAndUnwrappedNative() (gas: 701002)
-VerifierBulkVerifyBillingReport:test_verifyBulkWithLinkAndWrappedNative() (gas: 685582)
-VerifierBulkVerifyBillingReport:test_verifyMultiVersions() (gas: 568438)
-VerifierBulkVerifyBillingReport:test_verifyMultiVersionsReturnsVerifiedReports() (gas: 781249)
-VerifierBulkVerifyBillingReport:test_verifyWithBulkLink() (gas: 578193)
-VerifierBulkVerifyBillingReport:test_verifyWithBulkNative() (gas: 581776)
-VerifierBulkVerifyBillingReport:test_verifyWithBulkNativeUnwrapped() (gas: 589250)
-VerifierBulkVerifyBillingReport:test_verifyWithBulkNativeUnwrappedReturnsChange() (gas: 596277)
+VerifierBulkVerifyBillingReport:test_verifyMultiVersions() (gas: 475575)
+VerifierBulkVerifyBillingReport:test_verifyMultiVersionsReturnsVerifiedReports() (gas: 681851)
+VerifierBulkVerifyBillingReport:test_verifyWithBulkLink() (gas: 556847)
+VerifierBulkVerifyBillingReport:test_verifyWithBulkNative() (gas: 560426)
+VerifierBulkVerifyBillingReport:test_verifyWithBulkNativeUnwrapped() (gas: 567917)
+VerifierBulkVerifyBillingReport:test_verifyWithBulkNativeUnwrappedReturnsChange() (gas: 574921)
VerifierConstructorTest:test_revertsIfInitializedWithEmptyVerifierProxy() (gas: 59967)
VerifierConstructorTest:test_setsTheCorrectProperties() (gas: 1815769)
VerifierDeactivateFeedWithVerifyTest:test_currentReportAllowsVerification() (gas: 192062)
VerifierDeactivateFeedWithVerifyTest:test_currentReportFailsVerification() (gas: 111727)
VerifierDeactivateFeedWithVerifyTest:test_previousReportAllowsVerification() (gas: 99613)
VerifierDeactivateFeedWithVerifyTest:test_previousReportFailsVerification() (gas: 68305)
-VerifierProxyAccessControlledVerificationTest:test_proxiesToTheVerifierIfHasAccess() (gas: 204836)
-VerifierProxyAccessControlledVerificationTest:test_revertsIfNoAccess() (gas: 107889)
-VerifierProxyConstructorTest:test_correctlySetsTheCorrectAccessControllerInterface() (gas: 1439877)
-VerifierProxyConstructorTest:test_correctlySetsTheOwner() (gas: 1419891)
+VerifierProxyAccessControlledVerificationTest:test_proxiesToTheVerifierIfHasAccess() (gas: 205796)
+VerifierProxyAccessControlledVerificationTest:test_revertsIfNoAccess() (gas: 110688)
+VerifierProxyConstructorTest:test_correctlySetsTheCorrectAccessControllerInterface() (gas: 1482522)
+VerifierProxyConstructorTest:test_correctlySetsTheOwner() (gas: 1462646)
VerifierProxyConstructorTest:test_correctlySetsVersion() (gas: 6873)
-VerifierProxyInitializeVerifierTest:test_revertsIfDigestAlreadySet() (gas: 54107)
-VerifierProxyInitializeVerifierTest:test_revertsIfNotCorrectVerifier() (gas: 13572)
-VerifierProxyInitializeVerifierTest:test_revertsIfNotOwner() (gas: 17179)
-VerifierProxyInitializeVerifierTest:test_revertsIfVerifierAlreadyInitialized() (gas: 42069)
-VerifierProxyInitializeVerifierTest:test_revertsIfZeroAddress() (gas: 10970)
+VerifierProxyInitializeVerifierTest:test_revertsIfDigestAlreadySet() (gas: 54108)
+VerifierProxyInitializeVerifierTest:test_revertsIfNotCorrectVerifier() (gas: 13595)
+VerifierProxyInitializeVerifierTest:test_revertsIfNotOwner() (gas: 17157)
+VerifierProxyInitializeVerifierTest:test_revertsIfVerifierAlreadyInitialized() (gas: 42025)
+VerifierProxyInitializeVerifierTest:test_revertsIfZeroAddress() (gas: 10948)
VerifierProxyInitializeVerifierTest:test_setFeeManagerWhichDoesntHonourIERC165Interface() (gas: 13815)
VerifierProxyInitializeVerifierTest:test_setFeeManagerWhichDoesntHonourInterface() (gas: 16301)
VerifierProxyInitializeVerifierTest:test_setFeeManagerZeroAddress() (gas: 10947)
-VerifierProxyInitializeVerifierTest:test_updatesVerifierIfVerifier() (gas: 53337)
-VerifierProxySetAccessControllerTest:test_emitsTheCorrectEvent() (gas: 35384)
-VerifierProxySetAccessControllerTest:test_revertsIfCalledByNonOwner() (gas: 15105)
-VerifierProxySetAccessControllerTest:test_successfullySetsNewAccessController() (gas: 32120)
-VerifierProxySetAccessControllerTest:test_successfullySetsNewAccessControllerIsEmpty() (gas: 12219)
+VerifierProxyInitializeVerifierTest:test_updatesVerifierIfVerifier() (gas: 53406)
+VerifierProxySetAccessControllerTest:test_emitsTheCorrectEvent() (gas: 35340)
+VerifierProxySetAccessControllerTest:test_revertsIfCalledByNonOwner() (gas: 15061)
+VerifierProxySetAccessControllerTest:test_successfullySetsNewAccessController() (gas: 32032)
+VerifierProxySetAccessControllerTest:test_successfullySetsNewAccessControllerIsEmpty() (gas: 12131)
VerifierProxyUnsetVerifierTest:test_revertsIfDigestDoesNotExist() (gas: 13141)
VerifierProxyUnsetVerifierTest:test_revertsIfNotAdmin() (gas: 14965)
-VerifierProxyUnsetVerifierWithPreviouslySetVerifierTest:test_correctlyUnsetsVerifier() (gas: 12697)
+VerifierProxyUnsetVerifierWithPreviouslySetVerifierTest:test_correctlyUnsetsVerifier() (gas: 12720)
VerifierProxyUnsetVerifierWithPreviouslySetVerifierTest:test_emitsAnEventAfterUnsettingVerifier() (gas: 17965)
-VerifierProxyVerifyTest:test_proxiesToTheCorrectVerifier() (gas: 198420)
-VerifierProxyVerifyTest:test_revertsIfNoVerifierConfigured() (gas: 114671)
-VerifierSetConfigFromSourceMultipleDigestsTest:test_correctlySetsConfigWhenDigestsAreRemoved() (gas: 538873)
-VerifierSetConfigFromSourceMultipleDigestsTest:test_correctlyUpdatesDigestsOnMultipleVerifiersInTheProxy() (gas: 964634)
-VerifierSetConfigFromSourceMultipleDigestsTest:test_correctlyUpdatesTheDigestInTheProxy() (gas: 520434)
+VerifierProxyVerifyTest:test_proxiesToTheCorrectVerifier() (gas: 201609)
+VerifierProxyVerifyTest:test_revertsIfNoVerifierConfigured() (gas: 115615)
+VerifierSetConfigFromSourceMultipleDigestsTest:test_correctlySetsConfigWhenDigestsAreRemoved() (gas: 538896)
+VerifierSetConfigFromSourceMultipleDigestsTest:test_correctlyUpdatesDigestsOnMultipleVerifiersInTheProxy() (gas: 964726)
+VerifierSetConfigFromSourceMultipleDigestsTest:test_correctlyUpdatesTheDigestInTheProxy() (gas: 520480)
VerifierSetConfigFromSourceTest:test_revertsIfCalledByNonOwner() (gas: 183215)
-VerifierSetConfigTest:test_correctlyUpdatesTheConfig() (gas: 1057922)
+VerifierSetConfigTest:test_correctlyUpdatesTheConfig() (gas: 1057923)
VerifierSetConfigTest:test_revertsIfCalledByNonOwner() (gas: 182984)
VerifierSetConfigTest:test_revertsIfDuplicateSigners() (gas: 251559)
VerifierSetConfigTest:test_revertsIfFaultToleranceIsZero() (gas: 176543)
VerifierSetConfigTest:test_revertsIfNotEnoughSigners() (gas: 15835)
VerifierSetConfigTest:test_revertsIfSetWithTooManySigners() (gas: 22213)
VerifierSetConfigTest:test_revertsIfSignerContainsZeroAddress() (gas: 228032)
-VerifierSetConfigWhenThereAreMultipleDigestsTest:test_correctlySetsConfigWhenDigestsAreRemoved() (gas: 538622)
-VerifierSetConfigWhenThereAreMultipleDigestsTest:test_correctlyUpdatesDigestsOnMultipleVerifiersInTheProxy() (gas: 964123)
-VerifierSetConfigWhenThereAreMultipleDigestsTest:test_correctlyUpdatesTheDigestInTheProxy() (gas: 520174)
+VerifierSetConfigWhenThereAreMultipleDigestsTest:test_correctlySetsConfigWhenDigestsAreRemoved() (gas: 538645)
+VerifierSetConfigWhenThereAreMultipleDigestsTest:test_correctlyUpdatesDigestsOnMultipleVerifiersInTheProxy() (gas: 964215)
+VerifierSetConfigWhenThereAreMultipleDigestsTest:test_correctlyUpdatesTheDigestInTheProxy() (gas: 520220)
VerifierSupportsInterfaceTest:test_falseIfIsNotCorrectInterface() (gas: 5590)
VerifierSupportsInterfaceTest:test_trueIfIsCorrectInterface() (gas: 5633)
-VerifierTestBillingReport:test_verifyWithLink() (gas: 278565)
-VerifierTestBillingReport:test_verifyWithNative() (gas: 319255)
-VerifierTestBillingReport:test_verifyWithNativeUnwrapped() (gas: 321498)
-VerifierTestBillingReport:test_verifyWithNativeUnwrappedReturnsChange() (gas: 328564)
+VerifierTestBillingReport:test_verifyWithLink() (gas: 274946)
+VerifierTestBillingReport:test_verifyWithNative() (gas: 315644)
+VerifierTestBillingReport:test_verifyWithNativeUnwrapped() (gas: 317892)
+VerifierTestBillingReport:test_verifyWithNativeUnwrappedReturnsChange() (gas: 324958)
VerifierVerifyMultipleConfigDigestTest:test_canVerifyNewerReportsWithNewerConfigs() (gas: 131228)
VerifierVerifyMultipleConfigDigestTest:test_canVerifyOlderReportsWithOlderConfigs() (gas: 187132)
VerifierVerifyMultipleConfigDigestTest:test_revertsIfAReportIsVerifiedWithAnExistingButIncorrectDigest() (gas: 86566)
@@ -255,11 +250,11 @@ VerifierVerifySingleConfigDigestTest:test_revertsIfVerifiedByNonProxy() (gas: 99
VerifierVerifySingleConfigDigestTest:test_revertsIfVerifiedWithIncorrectAddresses() (gas: 182416)
VerifierVerifySingleConfigDigestTest:test_revertsIfWrongNumberOfSigners() (gas: 108382)
VerifierVerifySingleConfigDigestTest:test_setsTheCorrectEpoch() (gas: 194270)
-Verifier_accessControlledVerify:testVerifyWithAccessControl_gas() (gas: 208853)
-Verifier_bulkVerifyWithFee:testBulkVerifyProxyWithLinkFeeSuccess_gas() (gas: 540715)
-Verifier_bulkVerifyWithFee:testBulkVerifyProxyWithNativeFeeSuccess_gas() (gas: 564087)
-Verifier_setConfig:testSetConfigSuccess_gas() (gas: 922659)
-Verifier_verify:testVerifyProxySuccess_gas() (gas: 195542)
+Verifier_accessControlledVerify:testVerifyWithAccessControl_gas() (gas: 212066)
+Verifier_bulkVerifyWithFee:testBulkVerifyProxyWithLinkFeeSuccess_gas() (gas: 519368)
+Verifier_bulkVerifyWithFee:testBulkVerifyProxyWithNativeFeeSuccess_gas() (gas: 542767)
+Verifier_setConfig:testSetConfigSuccess_gas() (gas: 922682)
+Verifier_verify:testVerifyProxySuccess_gas() (gas: 198731)
Verifier_verify:testVerifySuccess_gas() (gas: 186725)
-Verifier_verifyWithFee:testVerifyProxyWithLinkFeeSuccess_gas() (gas: 242514)
-Verifier_verifyWithFee:testVerifyProxyWithNativeFeeSuccess_gas() (gas: 260991)
\ No newline at end of file
+Verifier_verifyWithFee:testVerifyProxyWithLinkFeeSuccess_gas() (gas: 238886)
+Verifier_verifyWithFee:testVerifyProxyWithNativeFeeSuccess_gas() (gas: 257382)
\ No newline at end of file
diff --git a/contracts/src/v0.8/llo-feeds/VerifierProxy.sol b/contracts/src/v0.8/llo-feeds/VerifierProxy.sol
index 4df6691b6a..ed5acc2f4e 100644
--- a/contracts/src/v0.8/llo-feeds/VerifierProxy.sol
+++ b/contracts/src/v0.8/llo-feeds/VerifierProxy.sol
@@ -121,24 +121,30 @@ contract VerifierProxy is IVerifierProxy, ConfirmedOwner, TypeAndVersionInterfac
}
/// @inheritdoc IVerifierProxy
- function verify(bytes calldata payload) external payable checkAccess returns (bytes memory) {
+ function verify(
+ bytes calldata payload,
+ bytes calldata parameterPayload
+ ) external payable checkAccess returns (bytes memory) {
IVerifierFeeManager feeManager = s_feeManager;
// Bill the verifier
if (address(feeManager) != address(0)) {
- feeManager.processFee{value: msg.value}(payload, msg.sender);
+ feeManager.processFee{value: msg.value}(payload, parameterPayload, msg.sender);
}
return _verify(payload);
}
/// @inheritdoc IVerifierProxy
- function verifyBulk(bytes[] calldata payloads) external payable checkAccess returns (bytes[] memory verifiedReports) {
+ function verifyBulk(
+ bytes[] calldata payloads,
+ bytes calldata parameterPayload
+ ) external payable checkAccess returns (bytes[] memory verifiedReports) {
IVerifierFeeManager feeManager = s_feeManager;
// Bill the verifier
if (address(feeManager) != address(0)) {
- feeManager.processFeeBulk{value: msg.value}(payloads, msg.sender);
+ feeManager.processFeeBulk{value: msg.value}(payloads, parameterPayload, msg.sender);
}
//verify the reports
diff --git a/contracts/src/v0.8/llo-feeds/dev/FeeManager.sol b/contracts/src/v0.8/llo-feeds/dev/FeeManager.sol
index 94beaedea3..1b229d5bf9 100644
--- a/contracts/src/v0.8/llo-feeds/dev/FeeManager.sol
+++ b/contracts/src/v0.8/llo-feeds/dev/FeeManager.sol
@@ -169,8 +169,16 @@ contract FeeManager is IFeeManager, ConfirmedOwner, TypeAndVersionInterface {
}
/// @inheritdoc IVerifierFeeManager
- function processFee(bytes calldata payload, address subscriber) external payable override onlyProxy {
- (Common.Asset memory fee, Common.Asset memory reward, uint256 appliedDiscount) = _processFee(payload, subscriber);
+ function processFee(
+ bytes calldata payload,
+ bytes calldata parameterPayload,
+ address subscriber
+ ) external payable override onlyProxy {
+ (Common.Asset memory fee, Common.Asset memory reward, uint256 appliedDiscount) = _processFee(
+ payload,
+ parameterPayload,
+ subscriber
+ );
if (fee.amount == 0) {
_tryReturnChange(subscriber, msg.value);
@@ -188,7 +196,11 @@ contract FeeManager is IFeeManager, ConfirmedOwner, TypeAndVersionInterface {
}
/// @inheritdoc IVerifierFeeManager
- function processFeeBulk(bytes[] calldata payloads, address subscriber) external payable override onlyProxy {
+ function processFeeBulk(
+ bytes[] calldata payloads,
+ bytes calldata parameterPayload,
+ address subscriber
+ ) external payable override onlyProxy {
FeeAndReward[] memory feesAndRewards = new IFeeManager.FeeAndReward[](payloads.length);
//keep track of the number of fees to prevent over initialising the FeePayment array within _convertToLinkAndNativeFees
@@ -199,6 +211,7 @@ contract FeeManager is IFeeManager, ConfirmedOwner, TypeAndVersionInterface {
for (uint256 i; i < payloads.length; ++i) {
(Common.Asset memory fee, Common.Asset memory reward, uint256 appliedDiscount) = _processFee(
payloads[i],
+ parameterPayload,
subscriber
);
@@ -232,7 +245,7 @@ contract FeeManager is IFeeManager, ConfirmedOwner, TypeAndVersionInterface {
function getFeeAndReward(
address subscriber,
bytes memory report,
- Quote memory quote
+ address quoteAddress
) public view returns (Common.Asset memory, Common.Asset memory, uint256) {
Common.Asset memory fee;
Common.Asset memory reward;
@@ -251,7 +264,7 @@ contract FeeManager is IFeeManager, ConfirmedOwner, TypeAndVersionInterface {
}
//verify the quote payload is a supported token
- if (quote.quoteAddress != i_nativeAddress && quote.quoteAddress != i_linkAddress) {
+ if (quoteAddress != i_nativeAddress && quoteAddress != i_linkAddress) {
revert InvalidQuote();
}
@@ -270,14 +283,14 @@ contract FeeManager is IFeeManager, ConfirmedOwner, TypeAndVersionInterface {
}
//get the discount being applied
- uint256 discount = s_subscriberDiscounts[subscriber][feedId][quote.quoteAddress];
+ uint256 discount = s_subscriberDiscounts[subscriber][feedId][quoteAddress];
//the reward is always set in LINK
reward.assetAddress = i_linkAddress;
reward.amount = Math.ceilDiv(linkQuantity * (PERCENTAGE_SCALAR - discount), PERCENTAGE_SCALAR);
//calculate either the LINK fee or native fee if it's within the report
- if (quote.quoteAddress == i_linkAddress) {
+ if (quoteAddress == i_linkAddress) {
fee.assetAddress = i_linkAddress;
fee.amount = reward.amount;
} else {
@@ -358,6 +371,7 @@ contract FeeManager is IFeeManager, ConfirmedOwner, TypeAndVersionInterface {
function _processFee(
bytes calldata payload,
+ bytes calldata parameterPayload,
address subscriber
) internal view returns (Common.Asset memory, Common.Asset memory, uint256) {
if (subscriber == address(this)) revert InvalidAddress();
@@ -369,17 +383,10 @@ contract FeeManager is IFeeManager, ConfirmedOwner, TypeAndVersionInterface {
bytes32 feedId = bytes32(report);
//v1 doesn't need a quote payload, so skip the decoding
- Quote memory quote;
+ address quote;
if (_getReportVersion(feedId) != REPORT_V1) {
- //all reports greater than v1 should have a quote payload
- (, , , , , bytes memory quoteBytes) = abi.decode(
- payload,
- // reportContext, report, rs, ss, raw, quote
- (bytes32[3], bytes, bytes32[], bytes32[], bytes32, bytes)
- );
-
//decode the quote from the bytes
- (quote) = abi.decode(quoteBytes, (Quote));
+ (quote) = abi.decode(parameterPayload, (address));
}
//decode the fee, it will always be native or LINK
diff --git a/contracts/src/v0.8/llo-feeds/dev/interfaces/IFeeManager.sol b/contracts/src/v0.8/llo-feeds/dev/interfaces/IFeeManager.sol
index 49fd7f9558..dc5bffd159 100644
--- a/contracts/src/v0.8/llo-feeds/dev/interfaces/IFeeManager.sol
+++ b/contracts/src/v0.8/llo-feeds/dev/interfaces/IFeeManager.sol
@@ -10,13 +10,13 @@ interface IFeeManager is IERC165, IVerifierFeeManager {
* @notice Calculate the applied fee and the reward from a report. If the sender is a subscriber, they will receive a discount.
* @param subscriber address trying to verify
* @param report report to calculate the fee for
- * @param quote any metadata required to fetch the fee
+ * @param quoteAddress address of the quote payment token
* @return (fee, reward, totalDiscount) fee and the reward data with the discount applied
*/
function getFeeAndReward(
address subscriber,
bytes memory report,
- Quote memory quote
+ address quoteAddress
) external returns (Common.Asset memory, Common.Asset memory, uint256);
/**
diff --git a/contracts/src/v0.8/llo-feeds/dev/interfaces/IVerifierFeeManager.sol b/contracts/src/v0.8/llo-feeds/dev/interfaces/IVerifierFeeManager.sol
index c9b1a82174..819a2134c3 100644
--- a/contracts/src/v0.8/llo-feeds/dev/interfaces/IVerifierFeeManager.sol
+++ b/contracts/src/v0.8/llo-feeds/dev/interfaces/IVerifierFeeManager.sol
@@ -7,17 +7,23 @@ import {Common} from "../../../libraries/Common.sol";
interface IVerifierFeeManager is IERC165 {
/**
* @notice Handles fees for a report from the subscriber and manages rewards
- * @param payload report and quote to process the fee for
+ * @param payload report to process the fee for
+ * @param parameterPayload fee payload
* @param subscriber address of the fee will be applied
*/
- function processFee(bytes calldata payload, address subscriber) external payable;
+ function processFee(bytes calldata payload, bytes calldata parameterPayload, address subscriber) external payable;
/**
* @notice Processes the fees for each report in the payload, billing the subscriber and paying the reward manager
- * @param payloads reports and quotes to process
+ * @param payloads reports to process
+ * @param parameterPayload fee payload
* @param subscriber address of the user to process fee for
*/
- function processFeeBulk(bytes[] calldata payloads, address subscriber) external payable;
+ function processFeeBulk(
+ bytes[] calldata payloads,
+ bytes calldata parameterPayload,
+ address subscriber
+ ) external payable;
/**
* @notice Sets the fee recipients according to the fee manager
diff --git a/contracts/src/v0.8/llo-feeds/interfaces/IVerifierProxy.sol b/contracts/src/v0.8/llo-feeds/interfaces/IVerifierProxy.sol
index 82ac492f5c..2cad538bd1 100644
--- a/contracts/src/v0.8/llo-feeds/interfaces/IVerifierProxy.sol
+++ b/contracts/src/v0.8/llo-feeds/interfaces/IVerifierProxy.sol
@@ -10,19 +10,27 @@ interface IVerifierProxy {
* @notice Verifies that the data encoded has been signed
* correctly by routing to the correct verifier, and bills the user if applicable.
* @param payload The encoded data to be verified, including the signed
- * report and any metadata for billing.
+ * report.
+ * @param parameterPayload fee metadata for billing
* @return verifierResponse The encoded report from the verifier.
*/
- function verify(bytes calldata payload) external payable returns (bytes memory verifierResponse);
+ function verify(
+ bytes calldata payload,
+ bytes calldata parameterPayload
+ ) external payable returns (bytes memory verifierResponse);
/**
* @notice Bulk verifies that the data encoded has been signed
* correctly by routing to the correct verifier, and bills the user if applicable.
* @param payloads The encoded payloads to be verified, including the signed
- * report and any metadata for billing.
+ * report.
+ * @param parameterPayload fee metadata for billing
* @return verifiedReports The encoded reports from the verifier.
*/
- function verifyBulk(bytes[] calldata payloads) external payable returns (bytes[] memory verifiedReports);
+ function verifyBulk(
+ bytes[] calldata payloads,
+ bytes calldata parameterPayload
+ ) external payable returns (bytes[] memory verifiedReports);
/**
* @notice Sets the verifier address initially, allowing `setVerifier` to be set by this Verifier in the future
diff --git a/contracts/src/v0.8/llo-feeds/test/fee-manager/BaseFeeManager.t.sol b/contracts/src/v0.8/llo-feeds/test/fee-manager/BaseFeeManager.t.sol
index bcc5aa7031..4f06d2c5ed 100644
--- a/contracts/src/v0.8/llo-feeds/test/fee-manager/BaseFeeManager.t.sol
+++ b/contracts/src/v0.8/llo-feeds/test/fee-manager/BaseFeeManager.t.sol
@@ -98,8 +98,8 @@ contract BaseFeeManagerTest is Test {
native = new WERC20Mock();
feeManagerProxy = new FeeManagerProxy();
- rewardManager = new RewardManager(getLinkAddress());
- feeManager = new FeeManager(getLinkAddress(), getNativeAddress(), address(feeManagerProxy), address(rewardManager));
+ rewardManager = new RewardManager(address(link));
+ feeManager = new FeeManager(address(link), address(native), address(feeManagerProxy), address(rewardManager));
//link the feeManager to the proxy
feeManagerProxy.setFeeManager(feeManager);
@@ -154,33 +154,21 @@ contract BaseFeeManagerTest is Test {
}
// solium-disable-next-line no-unused-vars
- function getFee(
- bytes memory report,
- IFeeManager.Quote memory quote,
- address subscriber
- ) public view returns (Common.Asset memory) {
+ function getFee(bytes memory report, address quote, address subscriber) public view returns (Common.Asset memory) {
//get the fee
(Common.Asset memory fee, , ) = feeManager.getFeeAndReward(subscriber, report, quote);
return fee;
}
- function getReward(
- bytes memory report,
- IFeeManager.Quote memory quote,
- address subscriber
- ) public view returns (Common.Asset memory) {
+ function getReward(bytes memory report, address quote, address subscriber) public view returns (Common.Asset memory) {
//get the reward
(, Common.Asset memory reward, ) = feeManager.getFeeAndReward(subscriber, report, quote);
return reward;
}
- function getAppliedDiscount(
- bytes memory report,
- IFeeManager.Quote memory quote,
- address subscriber
- ) public view returns (uint256) {
+ function getAppliedDiscount(bytes memory report, address quote, address subscriber) public view returns (uint256) {
//get the reward
(, , uint256 appliedDiscount) = feeManager.getFeeAndReward(subscriber, report, quote);
@@ -239,12 +227,12 @@ contract BaseFeeManagerTest is Test {
);
}
- function getLinkQuote() public view returns (IFeeManager.Quote memory) {
- return IFeeManager.Quote(getLinkAddress());
+ function getLinkQuote() public view returns (address) {
+ return address(link);
}
- function getNativeQuote() public view returns (IFeeManager.Quote memory) {
- return IFeeManager.Quote(getNativeAddress());
+ function getNativeQuote() public view returns (address) {
+ return address(native);
}
function withdraw(address assetAddress, address recipient, uint256 amount, address sender) public {
@@ -302,6 +290,7 @@ contract BaseFeeManagerTest is Test {
function ProcessFeeAsUser(
bytes memory payload,
address subscriber,
+ address tokenAddress,
uint256 wrappedNativeValue,
address sender
) public {
@@ -310,50 +299,43 @@ contract BaseFeeManagerTest is Test {
changePrank(sender);
//process the fee
- feeManager.processFee{value: wrappedNativeValue}(payload, subscriber);
+ feeManager.processFee{value: wrappedNativeValue}(payload, abi.encode(tokenAddress), subscriber);
//change ProcessFeeAsUserback to the original address
changePrank(originalAddr);
}
- function processFee(bytes memory payload, address subscriber, uint256 wrappedNativeValue) public {
+ function processFee(bytes memory payload, address subscriber, address feeAddress, uint256 wrappedNativeValue) public {
//record the current address and switch to the recipient
address originalAddr = msg.sender;
changePrank(subscriber);
//process the fee
- feeManagerProxy.processFee{value: wrappedNativeValue}(payload);
+ feeManagerProxy.processFee{value: wrappedNativeValue}(payload, abi.encode(feeAddress));
//change back to the original address
changePrank(originalAddr);
}
- function processFee(bytes[] memory payloads, address subscriber, uint256 wrappedNativeValue) public {
+ function processFee(
+ bytes[] memory payloads,
+ address subscriber,
+ address feeAddress,
+ uint256 wrappedNativeValue
+ ) public {
//record the current address and switch to the recipient
address originalAddr = msg.sender;
changePrank(subscriber);
//process the fee
- feeManagerProxy.processFeeBulk{value: wrappedNativeValue}(payloads);
+ feeManagerProxy.processFeeBulk{value: wrappedNativeValue}(payloads, abi.encode(feeAddress));
//change back to the original address
changePrank(originalAddr);
}
- function getPayload(bytes memory reportPayload, bytes memory quotePayload) public pure returns (bytes memory) {
- return
- abi.encode(
- [DEFAULT_CONFIG_DIGEST, 0, 0],
- reportPayload,
- new bytes32[](1),
- new bytes32[](1),
- bytes32(""),
- quotePayload
- );
- }
-
- function getQuotePayload(address quoteAddress) public pure returns (bytes memory) {
- return abi.encode(quoteAddress);
+ function getPayload(bytes memory reportPayload) public pure returns (bytes memory) {
+ return abi.encode([DEFAULT_CONFIG_DIGEST, 0, 0], reportPayload, new bytes32[](1), new bytes32[](1), bytes32(""));
}
function approveLink(address spender, uint256 quantity, address sender) public {
@@ -380,14 +362,6 @@ contract BaseFeeManagerTest is Test {
changePrank(originalAddr);
}
- function getLinkAddress() public view returns (address) {
- return address(link);
- }
-
- function getNativeAddress() public view returns (address) {
- return address(native);
- }
-
function payLinkDeficit(bytes32 configDigest, address sender) public {
//record the current address and switch to the recipient
address originalAddr = msg.sender;
diff --git a/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.general.t.sol b/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.general.t.sol
index d776c54eb3..5277f3b687 100644
--- a/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.general.t.sol
+++ b/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.general.t.sol
@@ -28,7 +28,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
uint256 withdrawAmount = contractBalance / 2;
//withdraw some balance
- withdraw(getLinkAddress(), ADMIN, withdrawAmount, ADMIN);
+ withdraw(address(link), ADMIN, withdrawAmount, ADMIN);
//check the balance has been reduced
uint256 newContractBalance = getLinkBalance(address(feeManager));
@@ -76,7 +76,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
vm.expectRevert(ONLY_CALLABLE_BY_OWNER_ERROR);
//withdraw some balance
- withdraw(getLinkAddress(), ADMIN, DEFAULT_LINK_MINT_QUANTITY, USER);
+ withdraw(address(link), ADMIN, DEFAULT_LINK_MINT_QUANTITY, USER);
}
function test_eventIsEmittedAfterSurchargeIsSet() public {
@@ -101,10 +101,10 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
vm.expectEmit();
//emit the event that is expected to be emitted
- emit SubscriberDiscountUpdated(USER, DEFAULT_FEED_1_V3, getNativeAddress(), discount);
+ emit SubscriberDiscountUpdated(USER, DEFAULT_FEED_1_V3, address(native), discount);
//set the surcharge
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), discount, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), discount, ADMIN);
}
function test_eventIsEmittedUponWithdraw() public {
@@ -118,10 +118,10 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
vm.expectEmit();
//the event to be emitted
- emit Withdraw(ADMIN, ADMIN, getLinkAddress(), withdrawAmount);
+ emit Withdraw(ADMIN, ADMIN, address(link), withdrawAmount);
//withdraw some balance
- withdraw(getLinkAddress(), ADMIN, withdrawAmount, ADMIN);
+ withdraw(address(link), ADMIN, withdrawAmount, ADMIN);
}
function test_linkAvailableForPaymentReturnsLinkBalance() public {
@@ -137,7 +137,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_payLinkDeficit() public {
//get the default payload
- bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V3));
approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE, USER);
@@ -150,7 +150,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
emit InsufficientLink(contractFees);
//process the fee
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(native), 0);
//double check the rewardManager balance is 0
assertEq(getLinkBalance(address(rewardManager)), 0);
@@ -170,7 +170,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_payLinkDeficitTwice() public {
//get the default payload
- bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V3));
approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE, USER);
@@ -184,7 +184,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
emit InsufficientLink(contractFees);
//process the fee
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(native), 0);
//double check the rewardManager balance is 0
assertEq(getLinkBalance(address(rewardManager)), 0);
@@ -209,14 +209,14 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_payLinkDeficitPaysAllFeesProcessed() public {
//get the default payload
- bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V3));
//approve the native to be transferred from the user
approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE * 2, USER);
//processing the fee will transfer the native from the user to the feeManager
- processFee(payload, USER, 0);
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(native), 0);
+ processFee(payload, USER, address(native), 0);
//check the deficit has been increased twice
assertEq(getLinkDeficit(DEFAULT_CONFIG_DIGEST), DEFAULT_REPORT_LINK_FEE * 2);
diff --git a/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.getFeeAndReward.t.sol b/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.getFeeAndReward.t.sol
index f31c06bd41..03b8da0404 100644
--- a/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.getFeeAndReward.t.sol
+++ b/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.getFeeAndReward.t.sol
@@ -31,7 +31,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_discountAIsNotAppliedWhenSetForOtherUsers() public {
//set the subscriber discount for another user
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getLinkAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(link), FEE_SCALAR / 2, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), INVALID_ADDRESS);
@@ -50,7 +50,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_discountIsAppliedForLink() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getLinkAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(link), FEE_SCALAR / 2, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getLinkQuote(), USER);
@@ -61,7 +61,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_DiscountIsAppliedForNative() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), USER);
@@ -72,7 +72,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_discountIsNoLongerAppliedAfterRemoving() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getLinkAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(link), FEE_SCALAR / 2, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getLinkQuote(), USER);
@@ -81,7 +81,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
assertEq(fee.amount, DEFAULT_REPORT_LINK_FEE / 2);
//remove the discount
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getLinkAddress(), 0, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(link), 0, ADMIN);
//get the fee required by the feeManager
fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getLinkQuote(), USER);
@@ -181,7 +181,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
uint256 nativeSurcharge = FEE_SCALAR / 5;
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//set the surcharge
setNativeSurcharge(nativeSurcharge, ADMIN);
@@ -204,7 +204,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
vm.expectRevert(INVALID_QUOTE_ERROR);
//get the fee required by the feeManager
- getFee(getV3Report(DEFAULT_FEED_1_V3), IFeeManager.Quote(address(0)), USER);
+ getFee(getV3Report(DEFAULT_FEED_1_V3), address(0), USER);
}
function test_nativeSurcharge100Percent() public {
@@ -239,7 +239,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_discountIsAppliedWith100PercentSurcharge() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//set the surcharge
setNativeSurcharge(FEE_SCALAR, ADMIN);
@@ -256,7 +256,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_feeIsZeroWith100PercentDiscount() public {
//set the subscriber discount to 100%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), USER);
@@ -267,7 +267,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_feeIsUpdatedAfterDiscountIsRemoved() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), USER);
@@ -279,7 +279,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
assertEq(fee.amount, DEFAULT_REPORT_NATIVE_FEE - expectedDiscount);
//remove the discount
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), 0, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), 0, ADMIN);
//get the fee required by the feeManager
fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), USER);
@@ -290,7 +290,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_feeIsUpdatedAfterNewDiscountIsApplied() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), USER);
@@ -302,7 +302,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
assertEq(fee.amount, DEFAULT_REPORT_NATIVE_FEE - expectedDiscount);
//change the discount to 25%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 4, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 4, ADMIN);
//get the fee required by the feeManager
fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), USER);
@@ -319,7 +319,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
vm.expectRevert(INVALID_DISCOUNT_ERROR);
//set the subscriber discount to over 100%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR + 1, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR + 1, ADMIN);
}
function test_surchargeIsNotAppliedWith100PercentDiscount() public {
@@ -327,7 +327,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
uint256 nativeSurcharge = FEE_SCALAR / 5;
//set the subscriber discount to 100%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR, ADMIN);
//set the surcharge
setNativeSurcharge(nativeSurcharge, ADMIN);
@@ -344,7 +344,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
vm.expectRevert(ONLY_CALLABLE_BY_OWNER_ERROR);
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR, USER);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR, USER);
}
function test_surchargeFeeRoundsUpWhenUneven() public {
@@ -369,7 +369,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
uint256 discount = FEE_SCALAR / 3;
//set the subscriber discount to 33.333%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), discount, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), discount, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), USER);
@@ -391,8 +391,8 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_correctDiscountIsAppliedWhenBothTokensAreDiscounted() public {
//set the subscriber and native discounts
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getLinkAddress(), FEE_SCALAR / 4, ADMIN);
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(link), FEE_SCALAR / 4, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//get the fee required by the feeManager for both tokens
Common.Asset memory linkFee = getFee(getV3Report(DEFAULT_FEED_1_V3), getLinkQuote(), USER);
@@ -409,7 +409,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_discountIsNotAppliedToOtherFeeds() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_2_V3), getNativeQuote(), USER);
@@ -420,7 +420,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_noFeeIsAppliedWhenReportHasZeroFee() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(
@@ -435,7 +435,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_noFeeIsAppliedWhenReportHasZeroFeeAndDiscountAndSurchargeIsSet() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//set the surcharge
setNativeSurcharge(FEE_SCALAR / 2, ADMIN);
@@ -475,7 +475,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_getRewardWithLinkQuoteAndLinkDiscount() public {
//set the link discount
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getLinkAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(link), FEE_SCALAR / 2, ADMIN);
//get the fee required by the feeManager
Common.Asset memory reward = getReward(getV3Report(DEFAULT_FEED_1_V3), getLinkQuote(), USER);
@@ -505,7 +505,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_getRewardWithLinkDiscount() public {
//set the link discount
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getLinkAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(link), FEE_SCALAR / 2, ADMIN);
//get the fee required by the feeManager
Common.Asset memory reward = getReward(getV3Report(DEFAULT_FEED_1_V3), getLinkQuote(), USER);
@@ -516,7 +516,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_getLinkFeeIsRoundedUp() public {
//set the link discount
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getLinkAddress(), FEE_SCALAR / 3, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(link), FEE_SCALAR / 3, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getLinkQuote(), USER);
@@ -527,14 +527,14 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_getLinkRewardIsSameAsFee() public {
//set the link discount
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getLinkAddress(), FEE_SCALAR / 3, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(link), FEE_SCALAR / 3, ADMIN);
//get the fee required by the feeManager
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getLinkQuote(), USER);
Common.Asset memory reward = getReward(getV3Report(DEFAULT_FEED_1_V3), getLinkQuote(), USER);
//check the reward is in link
- assertEq(fee.assetAddress, getLinkAddress());
+ assertEq(fee.assetAddress, address(link));
//the reward should equal .66% of the base fee due to a 33% discount rounded down
assertEq(reward.amount, fee.amount);
@@ -545,7 +545,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
setNativeSurcharge(FEE_SCALAR / 2, ADMIN);
//set the link discount
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getLinkAddress(), FEE_SCALAR / 3, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(link), FEE_SCALAR / 3, ADMIN);
//get the fee required by the feeManager
Common.Asset memory reward = getReward(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), USER);
@@ -573,7 +573,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_discountIsReturnedForLink() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getLinkAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(link), FEE_SCALAR / 2, ADMIN);
//get the fee applied
uint256 discount = getAppliedDiscount(getV3Report(DEFAULT_FEED_1_V3), getLinkQuote(), USER);
@@ -584,7 +584,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_DiscountIsReturnedForNative() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//get the discount applied
uint256 discount = getAppliedDiscount(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), USER);
@@ -595,7 +595,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_DiscountIsReturnedForNativeWithSurcharge() public {
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//set the surcharge
setNativeSurcharge(FEE_SCALAR / 5, ADMIN);
diff --git a/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.processFee.t.sol b/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.processFee.t.sol
index aa0ca063d8..2f1faf93da 100644
--- a/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.processFee.t.sol
+++ b/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.processFee.t.sol
@@ -19,24 +19,24 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_nonAdminProxyUserCannotProcessFee() public {
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//should revert as the user is not the owner
vm.expectRevert(UNAUTHORIZED_ERROR);
//process the fee
- ProcessFeeAsUser(payload, USER, 0, USER);
+ ProcessFeeAsUser(payload, USER, address(link), 0, USER);
}
function test_processFeeAsProxy() public {
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//approve the link to be transferred from the from the subscriber to the rewardManager
approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE, USER);
//processing the fee will transfer the link from the user to the rewardManager
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(link), 0);
//check the link has been transferred
assertEq(getLinkBalance(address(rewardManager)), DEFAULT_REPORT_LINK_FEE);
@@ -47,35 +47,35 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_processFeeIfSubscriberIsSelf() public {
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//expect a revert due to the feeManager being the subscriber
vm.expectRevert(INVALID_ADDRESS_ERROR);
//process the fee will fail due to assertion
- processFee(payload, address(feeManager), 0);
+ processFee(payload, address(feeManager), address(native), 0);
}
function test_processFeeWithWithEmptyQuotePayload() public {
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), bytes(""));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//expect a revert as the quote is invalid
vm.expectRevert();
//processing the fee will transfer the link by default
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(0), 0);
}
function test_processFeeWithWithZeroQuotePayload() public {
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(INVALID_ADDRESS));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//expect a revert as the quote is invalid
vm.expectRevert(INVALID_QUOTE_ERROR);
//processing the fee will transfer the link by default
- processFee(payload, USER, 0);
+ processFee(payload, USER, INVALID_ADDRESS, 0);
}
function test_processFeeWithWithCorruptQuotePayload() public {
@@ -92,23 +92,23 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
vm.expectRevert();
//processing the fee will not withdraw anything as there is no fee to collect
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(link), 0);
}
function test_processFeeDefaultReportsStillVerifiesWithEmptyQuote() public {
//get the default payload
- bytes memory payload = getPayload(getV1Report(DEFAULT_FEED_1_V1), bytes(""));
+ bytes memory payload = getPayload(getV1Report(DEFAULT_FEED_1_V1));
//processing the fee will transfer the link from the user to the rewardManager
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(0), 0);
}
function test_processFeeWithDefaultReportPayloadAndQuoteStillVerifies() public {
//get the default payload
- bytes memory payload = getPayload(getV1Report(DEFAULT_FEED_1_V1), getQuotePayload(getLinkAddress()));
+ bytes memory payload = getPayload(getV1Report(DEFAULT_FEED_1_V1));
//processing the fee will not withdraw anything as there is no fee to collect
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(link), 0);
}
function test_processFeeNative() public {
@@ -116,13 +116,13 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE);
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//approve the native to be transferred from the user
approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE, USER);
//processing the fee will transfer the native from the user to the feeManager
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(native), 0);
//check the native has been transferred
assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE);
@@ -142,7 +142,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE / 2);
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//approve the native to be transferred from the user
approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE, USER);
@@ -157,7 +157,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
emit InsufficientLink(contractFees);
//processing the fee will transfer the native from the user to the feeManager
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(native), 0);
//check the native has been transferred
assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE);
@@ -175,10 +175,10 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE);
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//only the proxy or admin can call processFee, they will pass in the native value on the users behalf
- processFee(payload, USER, DEFAULT_REPORT_NATIVE_FEE);
+ processFee(payload, USER, address(native), DEFAULT_REPORT_NATIVE_FEE);
//check the native has been transferred and converted to wrapped native
assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE);
@@ -199,13 +199,13 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE);
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//expect a revert as not enough funds
vm.expectRevert(INVALID_DEPOSIT_ERROR);
//only the proxy or admin can call processFee, they will pass in the native value on the users behalf
- processFee(payload, USER, DEFAULT_REPORT_NATIVE_FEE - 1);
+ processFee(payload, USER, address(native), DEFAULT_REPORT_NATIVE_FEE - 1);
}
function test_processFeeWithUnwrappedNativeLinkAddress() public {
@@ -213,13 +213,13 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE);
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//expect a revert as not enough funds
vm.expectRevert(INSUFFICIENT_ALLOWANCE_ERROR);
//the change will be returned and the user will attempted to be billed in LINK
- processFee(payload, USER, DEFAULT_REPORT_NATIVE_FEE - 1);
+ processFee(payload, USER, address(link), DEFAULT_REPORT_NATIVE_FEE - 1);
}
function test_processFeeWithUnwrappedNativeLinkAddressExcessiveFee() public {
@@ -227,10 +227,10 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE, PROXY);
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//call processFee from the proxy to test whether the funds are returned to the subscriber. In reality, the funds would be returned to the caller of the proxy.
- processFee(payload, PROXY, DEFAULT_REPORT_NATIVE_FEE);
+ processFee(payload, PROXY, address(link), DEFAULT_REPORT_NATIVE_FEE);
//check the native unwrapped is no longer in the account
assertEq(getNativeBalance(address(feeManager)), 0);
@@ -251,10 +251,10 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE);
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//call processFee from the proxy to test whether the funds are returned to the subscriber. In reality, the funds would be returned to the caller of the proxy.
- processFee(payload, PROXY, DEFAULT_REPORT_NATIVE_FEE * 2);
+ processFee(payload, PROXY, address(native), DEFAULT_REPORT_NATIVE_FEE * 2);
//check the native has been transferred and converted to wrapped native
assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE);
@@ -272,13 +272,13 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_processFeeUsesCorrectDigest() public {
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//approve the link to be transferred from the from the subscriber to the rewardManager
approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE, USER);
//processing the fee will transfer the link from the user to the rewardManager
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(link), 0);
//check the link has been transferred
assertEq(getLinkBalance(address(rewardManager)), DEFAULT_REPORT_LINK_FEE);
@@ -301,18 +301,18 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
);
//processing the fee will transfer the link from the user to the rewardManager
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(0), 0);
}
function test_V2PayloadVerifies() public {
//get the default payload
- bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V2), getQuotePayload(getLinkAddress()));
+ bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V2));
//approve the link to be transferred from the from the subscriber to the rewardManager
approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE, USER);
//processing the fee will transfer the link from the user to the rewardManager
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(link), 0);
//check the link has been transferred
assertEq(getLinkBalance(address(rewardManager)), DEFAULT_REPORT_LINK_FEE);
@@ -323,62 +323,60 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_V2PayloadWithoutQuoteFails() public {
//get the default payload
- bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V2), bytes(""));
+ bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V2));
//expect a revert as the quote is invalid
vm.expectRevert();
//processing the fee will transfer the link from the user to the rewardManager
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(0), 0);
}
function test_V2PayloadWithoutZeroFee() public {
//get the default payload
- bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V2), getQuotePayload(getLinkAddress()));
+ bytes memory payload = getPayload(getV2Report(DEFAULT_FEED_1_V2));
//expect a revert as the quote is invalid
vm.expectRevert();
//processing the fee will transfer the link from the user to the rewardManager
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(link), 0);
}
function test_processFeeWithInvalidReportVersionFailsToDecode() public {
bytes memory data = abi.encode(0x0000100000000000000000000000000000000000000000000000000000000000);
//get the default payload
- bytes memory payload = getPayload(data, getQuotePayload(getLinkAddress()));
+ bytes memory payload = getPayload(data);
//serialization will fail as there is no report to decode
vm.expectRevert();
//processing the fee will not withdraw anything as there is no fee to collect
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(link), 0);
}
function test_processFeeWithZeroNativeNonZeroLinkWithNativeQuote() public {
//get the default payload
bytes memory payload = getPayload(
- getV3ReportWithCustomExpiryAndFee(DEFAULT_FEED_1_V3, block.timestamp, DEFAULT_REPORT_LINK_FEE, 0),
- getQuotePayload(getNativeAddress())
+ getV3ReportWithCustomExpiryAndFee(DEFAULT_FEED_1_V3, block.timestamp, DEFAULT_REPORT_LINK_FEE, 0)
);
//call processFee should not revert as the fee is 0
- processFee(payload, PROXY, 0);
+ processFee(payload, PROXY, address(native), 0);
}
function test_processFeeWithZeroNativeNonZeroLinkWithLinkQuote() public {
//get the default payload
bytes memory payload = getPayload(
- getV3ReportWithCustomExpiryAndFee(DEFAULT_FEED_1_V3, block.timestamp, DEFAULT_REPORT_LINK_FEE, 0),
- getQuotePayload(getLinkAddress())
+ getV3ReportWithCustomExpiryAndFee(DEFAULT_FEED_1_V3, block.timestamp, DEFAULT_REPORT_LINK_FEE, 0)
);
//approve the link to be transferred from the from the subscriber to the rewardManager
approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE, USER);
//processing the fee will transfer the link to the rewardManager from the user
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(link), 0);
//check the link has been transferred
assertEq(getLinkBalance(address(rewardManager)), DEFAULT_REPORT_LINK_FEE);
@@ -393,15 +391,14 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
//get the default payload
bytes memory payload = getPayload(
- getV3ReportWithCustomExpiryAndFee(DEFAULT_FEED_1_V3, block.timestamp, 0, DEFAULT_REPORT_NATIVE_FEE),
- getQuotePayload(getNativeAddress())
+ getV3ReportWithCustomExpiryAndFee(DEFAULT_FEED_1_V3, block.timestamp, 0, DEFAULT_REPORT_NATIVE_FEE)
);
//approve the native to be transferred from the user
approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE, USER);
//processing the fee will transfer the native from the user to the feeManager
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(native), 0);
//check the native has been transferred
assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE);
@@ -419,23 +416,21 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_processFeeWithZeroLinkNonZeroNativeWithLinkQuote() public {
//get the default payload
bytes memory payload = getPayload(
- getV3ReportWithCustomExpiryAndFee(DEFAULT_FEED_1_V3, block.timestamp, 0, DEFAULT_REPORT_NATIVE_FEE),
- getQuotePayload(getLinkAddress())
+ getV3ReportWithCustomExpiryAndFee(DEFAULT_FEED_1_V3, block.timestamp, 0, DEFAULT_REPORT_NATIVE_FEE)
);
//call processFee should not revert as the fee is 0
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(link), 0);
}
function test_processFeeWithZeroNativeNonZeroLinkReturnsChange() public {
//get the default payload
bytes memory payload = getPayload(
- getV3ReportWithCustomExpiryAndFee(DEFAULT_FEED_1_V3, block.timestamp, 0, DEFAULT_REPORT_NATIVE_FEE),
- getQuotePayload(getLinkAddress())
+ getV3ReportWithCustomExpiryAndFee(DEFAULT_FEED_1_V3, block.timestamp, 0, DEFAULT_REPORT_NATIVE_FEE)
);
//call processFee should not revert as the fee is 0
- processFee(payload, USER, DEFAULT_REPORT_NATIVE_FEE);
+ processFee(payload, USER, address(link), DEFAULT_REPORT_NATIVE_FEE);
//check the change has been returned
assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY);
@@ -443,10 +438,9 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_V1PayloadVerifiesAndReturnsChange() public {
//emulate a V1 payload with no quote
- bytes memory quotePayload;
- bytes memory payload = getPayload(getV1Report(DEFAULT_FEED_1_V1), quotePayload);
+ bytes memory payload = getPayload(getV1Report(DEFAULT_FEED_1_V1));
- processFee(payload, USER, DEFAULT_REPORT_NATIVE_FEE);
+ processFee(payload, USER, address(0), DEFAULT_REPORT_NATIVE_FEE);
//Fee manager should not contain any native
assertEq(address(feeManager).balance, 0);
@@ -461,13 +455,13 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE);
//set the subscriber discount to 50%
- setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, getNativeAddress(), FEE_SCALAR / 2, ADMIN);
+ setSubscriberDiscount(USER, DEFAULT_FEED_1_V3, address(native), FEE_SCALAR / 2, ADMIN);
//approve the native to be transferred from the user
approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE / 2, USER);
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
Common.Asset memory fee = getFee(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), USER);
Common.Asset memory reward = getReward(getV3Report(DEFAULT_FEED_1_V3), getNativeQuote(), USER);
@@ -478,7 +472,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
emit DiscountApplied(DEFAULT_CONFIG_DIGEST, USER, fee, reward, appliedDiscount);
//call processFee should not revert as the fee is 0
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(native), 0);
}
function test_processFeeWithNoDiscountDoesNotEmitEvent() public {
@@ -489,10 +483,10 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE, USER);
//get the default payload
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
//call processFee should not revert as the fee is 0
- processFee(payload, USER, 0);
+ processFee(payload, USER, address(native), 0);
//no logs should have been emitted
assertEq(vm.getRecordedLogs().length, 0);
diff --git a/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.processFeeBulk.t.sol b/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.processFeeBulk.t.sol
index ba415598b7..d2df254820 100644
--- a/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.processFeeBulk.t.sol
+++ b/contracts/src/v0.8/llo-feeds/test/fee-manager/FeeManager.processFeeBulk.t.sol
@@ -20,7 +20,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
}
function test_processMultipleLinkReports() public {
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
bytes[] memory payloads = new bytes[](NUMBER_OF_REPORTS);
for (uint256 i = 0; i < NUMBER_OF_REPORTS; ++i) {
@@ -29,7 +29,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE * NUMBER_OF_REPORTS, USER);
- processFee(payloads, USER, DEFAULT_NATIVE_MINT_QUANTITY);
+ processFee(payloads, USER, address(link), DEFAULT_NATIVE_MINT_QUANTITY);
assertEq(getLinkBalance(address(rewardManager)), DEFAULT_REPORT_LINK_FEE * NUMBER_OF_REPORTS);
assertEq(getLinkBalance(address(feeManager)), 0);
@@ -43,7 +43,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_processMultipleWrappedNativeReports() public {
mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE * NUMBER_OF_REPORTS + 1);
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
bytes[] memory payloads = new bytes[](NUMBER_OF_REPORTS);
for (uint256 i; i < NUMBER_OF_REPORTS; ++i) {
@@ -52,7 +52,7 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE * NUMBER_OF_REPORTS, USER);
- processFee(payloads, USER, 0);
+ processFee(payloads, USER, address(native), 0);
assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE * NUMBER_OF_REPORTS);
assertEq(getLinkBalance(address(rewardManager)), DEFAULT_REPORT_LINK_FEE * NUMBER_OF_REPORTS);
@@ -63,14 +63,14 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
function test_processMultipleUnwrappedNativeReports() public {
mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE * NUMBER_OF_REPORTS + 1);
- bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
+ bytes memory payload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
bytes[] memory payloads = new bytes[](NUMBER_OF_REPORTS);
for (uint256 i; i < NUMBER_OF_REPORTS; ++i) {
payloads[i] = payload;
}
- processFee(payloads, USER, DEFAULT_REPORT_NATIVE_FEE * NUMBER_OF_REPORTS * 2);
+ processFee(payloads, USER, address(native), DEFAULT_REPORT_NATIVE_FEE * NUMBER_OF_REPORTS * 2);
assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE * NUMBER_OF_REPORTS);
assertEq(getLinkBalance(address(rewardManager)), DEFAULT_REPORT_LINK_FEE * NUMBER_OF_REPORTS);
@@ -80,59 +80,8 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * NUMBER_OF_REPORTS);
}
- function test_processMultipleLinkAndNativeWrappedReports() public {
- mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE * 2 + 1);
-
- bytes memory nativePayload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
- bytes memory linkPayload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
-
- bytes[] memory payloads = new bytes[](5);
- payloads[0] = linkPayload;
- payloads[1] = linkPayload;
- payloads[2] = linkPayload;
- payloads[3] = nativePayload;
- payloads[4] = nativePayload;
-
- approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE * 2, USER);
- approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE * 3, USER);
-
- processFee(payloads, USER, 0);
-
- assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE * 2);
- assertEq(getLinkBalance(address(rewardManager)), DEFAULT_REPORT_LINK_FEE * 5);
- assertEq(getLinkBalance(address(feeManager)), 1);
- assertEq(getNativeBalance(USER), DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * 2);
- assertEq(getLinkBalance(USER), DEFAULT_LINK_MINT_QUANTITY - DEFAULT_REPORT_LINK_FEE * 3);
- }
-
- function test_processMultipleLinkAndNativeUnwrappedReports() public {
- mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE * 2 + 1);
-
- bytes memory nativePayload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
- bytes memory linkPayload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
-
- bytes[] memory payloads = new bytes[](5);
- payloads[0] = linkPayload;
- payloads[1] = linkPayload;
- payloads[2] = linkPayload;
- payloads[3] = nativePayload;
- payloads[4] = nativePayload;
-
- approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE * 3, USER);
-
- processFee(payloads, USER, DEFAULT_REPORT_NATIVE_FEE * 4);
-
- assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE * 2);
- assertEq(getLinkBalance(address(rewardManager)), DEFAULT_REPORT_LINK_FEE * 5);
- assertEq(getLinkBalance(address(feeManager)), 1);
-
- assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * 2);
- assertEq(PROXY.balance, DEFAULT_NATIVE_MINT_QUANTITY);
- assertEq(getLinkBalance(USER), DEFAULT_LINK_MINT_QUANTITY - DEFAULT_REPORT_LINK_FEE * 3);
- }
-
function test_processV1V2V3Reports() public {
- mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE * 2 + 1);
+ mintLink(address(feeManager), 1);
bytes memory payloadV1 = abi.encode(
[DEFAULT_CONFIG_DIGEST, 0, 0],
@@ -142,34 +91,30 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
bytes32("")
);
- bytes memory nativePayloadV2 = getPayload(getV2Report(DEFAULT_FEED_1_V2), getQuotePayload(getNativeAddress()));
- bytes memory linkPayloadV2 = getPayload(getV2Report(DEFAULT_FEED_1_V2), getQuotePayload(getLinkAddress()));
-
- bytes memory nativePayloadV3 = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
- bytes memory linkPayloadV3 = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
+ bytes memory linkPayloadV2 = getPayload(getV2Report(DEFAULT_FEED_1_V2));
+ bytes memory linkPayloadV3 = getPayload(getV3Report(DEFAULT_FEED_1_V3));
bytes[] memory payloads = new bytes[](5);
payloads[0] = payloadV1;
- payloads[1] = nativePayloadV2;
+ payloads[1] = linkPayloadV2;
payloads[2] = linkPayloadV2;
- payloads[3] = nativePayloadV3;
+ payloads[3] = linkPayloadV3;
payloads[4] = linkPayloadV3;
- approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE * 2, USER);
- approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE * 2, USER);
+ approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE * 4, USER);
- processFee(payloads, USER, 0);
+ processFee(payloads, USER, address(link), 0);
- assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE * 2);
+ assertEq(getNativeBalance(address(feeManager)), 0);
assertEq(getLinkBalance(address(rewardManager)), DEFAULT_REPORT_LINK_FEE * 4);
assertEq(getLinkBalance(address(feeManager)), 1);
- assertEq(getLinkBalance(USER), DEFAULT_LINK_MINT_QUANTITY - DEFAULT_REPORT_LINK_FEE * 2);
- assertEq(getNativeBalance(USER), DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * 2);
+ assertEq(getLinkBalance(USER), DEFAULT_LINK_MINT_QUANTITY - DEFAULT_REPORT_LINK_FEE * 4);
+ assertEq(getNativeBalance(USER), DEFAULT_NATIVE_MINT_QUANTITY - 0);
}
function test_processV1V2V3ReportsWithUnwrapped() public {
- mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE * 2 + 1);
+ mintLink(address(feeManager), DEFAULT_REPORT_LINK_FEE * 4 + 1);
bytes memory payloadV1 = abi.encode(
[DEFAULT_CONFIG_DIGEST, 0, 0],
@@ -179,29 +124,23 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
bytes32("")
);
- bytes memory nativePayloadV2 = getPayload(getV2Report(DEFAULT_FEED_1_V2), getQuotePayload(getNativeAddress()));
- bytes memory linkPayloadV2 = getPayload(getV2Report(DEFAULT_FEED_1_V2), getQuotePayload(getLinkAddress()));
-
- bytes memory nativePayloadV3 = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
- bytes memory linkPayloadV3 = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
+ bytes memory nativePayloadV2 = getPayload(getV2Report(DEFAULT_FEED_1_V2));
+ bytes memory nativePayloadV3 = getPayload(getV3Report(DEFAULT_FEED_1_V3));
bytes[] memory payloads = new bytes[](5);
payloads[0] = payloadV1;
payloads[1] = nativePayloadV2;
- payloads[2] = linkPayloadV2;
+ payloads[2] = nativePayloadV2;
payloads[3] = nativePayloadV3;
- payloads[4] = linkPayloadV3;
-
- approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE * 2, USER);
+ payloads[4] = nativePayloadV3;
- processFee(payloads, USER, DEFAULT_REPORT_NATIVE_FEE * 4);
+ processFee(payloads, USER, address(native), DEFAULT_REPORT_NATIVE_FEE * 4);
- assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE * 2);
+ assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE * 4);
assertEq(getLinkBalance(address(rewardManager)), DEFAULT_REPORT_LINK_FEE * 4);
assertEq(getLinkBalance(address(feeManager)), 1);
- assertEq(getLinkBalance(USER), DEFAULT_LINK_MINT_QUANTITY - DEFAULT_REPORT_LINK_FEE * 2);
- assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * 2);
+ assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * 4);
assertEq(PROXY.balance, DEFAULT_NATIVE_MINT_QUANTITY);
}
@@ -219,38 +158,39 @@ contract FeeManagerProcessFeeTest is BaseFeeManagerTest {
payloads[i] = payload;
}
- processFee(payloads, USER, DEFAULT_REPORT_NATIVE_FEE * 5);
+ processFee(payloads, USER, address(native), DEFAULT_REPORT_NATIVE_FEE * 5);
assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY);
assertEq(PROXY.balance, DEFAULT_NATIVE_MINT_QUANTITY);
}
function test_eventIsEmittedIfNotEnoughLink() public {
- bytes memory nativePayload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getNativeAddress()));
- bytes memory linkPayload = getPayload(getV3Report(DEFAULT_FEED_1_V3), getQuotePayload(getLinkAddress()));
+ bytes memory nativePayload = getPayload(getV3Report(DEFAULT_FEED_1_V3));
bytes[] memory payloads = new bytes[](5);
- payloads[0] = linkPayload;
- payloads[1] = linkPayload;
- payloads[2] = linkPayload;
+ payloads[0] = nativePayload;
+ payloads[1] = nativePayload;
+ payloads[2] = nativePayload;
payloads[3] = nativePayload;
payloads[4] = nativePayload;
- approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE * 2, USER);
- approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE * 3, USER);
+ approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE * 5, USER);
- IRewardManager.FeePayment[] memory payments = new IRewardManager.FeePayment[](2);
+ IRewardManager.FeePayment[] memory payments = new IRewardManager.FeePayment[](5);
payments[0] = IRewardManager.FeePayment(DEFAULT_CONFIG_DIGEST, uint192(DEFAULT_REPORT_LINK_FEE));
payments[1] = IRewardManager.FeePayment(DEFAULT_CONFIG_DIGEST, uint192(DEFAULT_REPORT_LINK_FEE));
+ payments[2] = IRewardManager.FeePayment(DEFAULT_CONFIG_DIGEST, uint192(DEFAULT_REPORT_LINK_FEE));
+ payments[3] = IRewardManager.FeePayment(DEFAULT_CONFIG_DIGEST, uint192(DEFAULT_REPORT_LINK_FEE));
+ payments[4] = IRewardManager.FeePayment(DEFAULT_CONFIG_DIGEST, uint192(DEFAULT_REPORT_LINK_FEE));
vm.expectEmit();
emit InsufficientLink(payments);
- processFee(payloads, USER, 0);
+ processFee(payloads, USER, address(native), 0);
- assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE * 2);
- assertEq(getNativeBalance(USER), DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * 2);
- assertEq(getLinkBalance(USER), DEFAULT_LINK_MINT_QUANTITY - DEFAULT_REPORT_LINK_FEE * 3);
+ assertEq(getNativeBalance(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE * 5);
+ assertEq(getNativeBalance(USER), DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * 5);
+ assertEq(getLinkBalance(USER), DEFAULT_LINK_MINT_QUANTITY);
}
}
diff --git a/contracts/src/v0.8/llo-feeds/test/gas/Gas_VerifierTest.t.sol b/contracts/src/v0.8/llo-feeds/test/gas/Gas_VerifierTest.t.sol
index d5c26fcd13..9b10a2430f 100644
--- a/contracts/src/v0.8/llo-feeds/test/gas/Gas_VerifierTest.t.sol
+++ b/contracts/src/v0.8/llo-feeds/test/gas/Gas_VerifierTest.t.sol
@@ -69,25 +69,23 @@ contract Verifier_verifyWithFee is BaseTestWithConfiguredVerifierAndFeeManager {
}
function testVerifyProxyWithLinkFeeSuccess_gas() public {
- bytes memory signedLinkPayload = _generateEncodedBlobWithQuote(
+ bytes memory signedLinkPayload = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(link))
+ _getSigners(FAULT_TOLERANCE + 1)
);
- s_verifierProxy.verify(signedLinkPayload);
+ s_verifierProxy.verify(signedLinkPayload, abi.encode(link));
}
function testVerifyProxyWithNativeFeeSuccess_gas() public {
- bytes memory signedNativePayload = _generateEncodedBlobWithQuote(
+ bytes memory signedNativePayload = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
+ _getSigners(FAULT_TOLERANCE + 1)
);
- s_verifierProxy.verify(signedNativePayload);
+ s_verifierProxy.verify(signedNativePayload, abi.encode(native));
}
}
@@ -130,11 +128,10 @@ contract Verifier_bulkVerifyWithFee is BaseTestWithConfiguredVerifierAndFeeManag
}
function testBulkVerifyProxyWithLinkFeeSuccess_gas() public {
- bytes memory signedLinkPayload = _generateEncodedBlobWithQuote(
+ bytes memory signedLinkPayload = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(link))
+ _getSigners(FAULT_TOLERANCE + 1)
);
bytes[] memory signedLinkPayloads = new bytes[](NUMBER_OF_REPORTS_TO_VERIFY);
@@ -142,15 +139,14 @@ contract Verifier_bulkVerifyWithFee is BaseTestWithConfiguredVerifierAndFeeManag
signedLinkPayloads[i] = signedLinkPayload;
}
- s_verifierProxy.verifyBulk(signedLinkPayloads);
+ s_verifierProxy.verifyBulk(signedLinkPayloads, abi.encode(link));
}
function testBulkVerifyProxyWithNativeFeeSuccess_gas() public {
- bytes memory signedNativePayload = _generateEncodedBlobWithQuote(
+ bytes memory signedNativePayload = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
+ _getSigners(FAULT_TOLERANCE + 1)
);
bytes[] memory signedNativePayloads = new bytes[](NUMBER_OF_REPORTS_TO_VERIFY);
@@ -158,7 +154,7 @@ contract Verifier_bulkVerifyWithFee is BaseTestWithConfiguredVerifierAndFeeManag
signedNativePayloads[i] = signedNativePayload;
}
- s_verifierProxy.verifyBulk(signedNativePayloads);
+ s_verifierProxy.verifyBulk(signedNativePayloads, abi.encode(native));
}
}
@@ -183,7 +179,7 @@ contract Verifier_verify is BaseTestWithConfiguredVerifierAndFeeManager {
bytes32[3] memory reportContext;
reportContext[0] = s_configDigest;
reportContext[1] = bytes32(abi.encode(uint32(5), uint8(1)));
- s_signedReport = _generateEncodedBlob(s_testReportOne, reportContext, _getSigners(FAULT_TOLERANCE + 1));
+ s_signedReport = _generateV1EncodedBlob(s_testReportOne, reportContext, _getSigners(FAULT_TOLERANCE + 1));
}
function testVerifySuccess_gas() public {
@@ -193,7 +189,7 @@ contract Verifier_verify is BaseTestWithConfiguredVerifierAndFeeManager {
}
function testVerifyProxySuccess_gas() public {
- s_verifierProxy.verify(s_signedReport);
+ s_verifierProxy.verify(s_signedReport, abi.encode(native));
}
}
@@ -222,7 +218,7 @@ contract Verifier_accessControlledVerify is BaseTestWithConfiguredVerifierAndFee
bytes32[3] memory reportContext;
reportContext[0] = s_configDigest;
reportContext[1] = bytes32(abi.encode(uint32(5), uint8(1)));
- s_signedReport = _generateEncodedBlob(s_testReportOne, reportContext, _getSigners(FAULT_TOLERANCE + 1));
+ s_signedReport = _generateV1EncodedBlob(s_testReportOne, reportContext, _getSigners(FAULT_TOLERANCE + 1));
s_accessController = new SimpleWriteAccessController();
s_verifierProxy.setAccessController(s_accessController);
s_accessController.addAccess(CLIENT);
@@ -230,6 +226,6 @@ contract Verifier_accessControlledVerify is BaseTestWithConfiguredVerifierAndFee
function testVerifyWithAccessControl_gas() public {
changePrank(CLIENT);
- s_verifierProxy.verify(s_signedReport);
+ s_verifierProxy.verify(s_signedReport, abi.encode(native));
}
}
diff --git a/contracts/src/v0.8/llo-feeds/test/mocks/FeeManagerProxy.sol b/contracts/src/v0.8/llo-feeds/test/mocks/FeeManagerProxy.sol
index 4e4a8d00e6..0d629e8c59 100644
--- a/contracts/src/v0.8/llo-feeds/test/mocks/FeeManagerProxy.sol
+++ b/contracts/src/v0.8/llo-feeds/test/mocks/FeeManagerProxy.sol
@@ -6,12 +6,12 @@ import "../../dev/interfaces/IFeeManager.sol";
contract FeeManagerProxy {
IFeeManager internal i_feeManager;
- function processFee(bytes calldata payload) public payable {
- i_feeManager.processFee{value: msg.value}(payload, msg.sender);
+ function processFee(bytes calldata payload, bytes calldata parameterPayload) public payable {
+ i_feeManager.processFee{value: msg.value}(payload, parameterPayload, msg.sender);
}
- function processFeeBulk(bytes[] calldata payloads) public payable {
- i_feeManager.processFeeBulk{value: msg.value}(payloads, msg.sender);
+ function processFeeBulk(bytes[] calldata payloads, bytes calldata parameterPayload) public payable {
+ i_feeManager.processFeeBulk{value: msg.value}(payloads, parameterPayload, msg.sender);
}
function setFeeManager(IFeeManager feeManager) public {
diff --git a/contracts/src/v0.8/llo-feeds/test/verifier/BaseVerifierTest.t.sol b/contracts/src/v0.8/llo-feeds/test/verifier/BaseVerifierTest.t.sol
index 0525e3ed14..758aae59db 100644
--- a/contracts/src/v0.8/llo-feeds/test/verifier/BaseVerifierTest.t.sol
+++ b/contracts/src/v0.8/llo-feeds/test/verifier/BaseVerifierTest.t.sol
@@ -163,7 +163,7 @@ contract BaseTest is Test {
);
}
- function _generateEncodedBlob(
+ function _generateV1EncodedBlob(
V1Report memory report,
bytes32[3] memory reportContext,
Signer[] memory signers
@@ -336,11 +336,10 @@ contract BaseTestWithConfiguredVerifierAndFeeManager is BaseTest {
);
}
- function _generateEncodedBlobWithQuote(
+ function _generateV3EncodedBlob(
V3Report memory report,
bytes32[3] memory reportContext,
- Signer[] memory signers,
- bytes memory quote
+ Signer[] memory signers
) internal pure returns (bytes memory) {
bytes memory reportBytes = _encodeReport(report);
(bytes32[] memory rs, bytes32[] memory ss, bytes32 rawVs) = _generateSignerSignatures(
@@ -348,12 +347,7 @@ contract BaseTestWithConfiguredVerifierAndFeeManager is BaseTest {
reportContext,
signers
);
-
- return abi.encode(reportContext, reportBytes, rs, ss, rawVs, quote);
- }
-
- function _generateQuote(address billingAddress) internal pure returns (bytes memory) {
- return abi.encode(billingAddress);
+ return abi.encode(reportContext, reportBytes, rs, ss, rawVs);
}
function _generateV1Report() internal view returns (V1Report memory) {
@@ -409,20 +403,25 @@ contract BaseTestWithConfiguredVerifierAndFeeManager is BaseTest {
changePrank(originalAddr);
}
- function _verify(bytes memory payload, uint256 wrappedNativeValue, address sender) internal {
+ function _verify(bytes memory payload, address feeAddress, uint256 wrappedNativeValue, address sender) internal {
address originalAddr = msg.sender;
changePrank(sender);
- s_verifierProxy.verify{value: wrappedNativeValue}(payload);
+ s_verifierProxy.verify{value: wrappedNativeValue}(payload, abi.encode(feeAddress));
changePrank(originalAddr);
}
- function _verifyBulk(bytes[] memory payload, uint256 wrappedNativeValue, address sender) internal {
+ function _verifyBulk(
+ bytes[] memory payload,
+ address feeAddress,
+ uint256 wrappedNativeValue,
+ address sender
+ ) internal {
address originalAddr = msg.sender;
changePrank(sender);
- s_verifierProxy.verifyBulk{value: wrappedNativeValue}(payload);
+ s_verifierProxy.verifyBulk{value: wrappedNativeValue}(payload, abi.encode(feeAddress));
changePrank(originalAddr);
}
diff --git a/contracts/src/v0.8/llo-feeds/test/verifier/VerifierActivateConfigTest.t.sol b/contracts/src/v0.8/llo-feeds/test/verifier/VerifierActivateConfigTest.t.sol
index 1905d28da9..641d277259 100644
--- a/contracts/src/v0.8/llo-feeds/test/verifier/VerifierActivateConfigTest.t.sol
+++ b/contracts/src/v0.8/llo-feeds/test/verifier/VerifierActivateConfigTest.t.sol
@@ -54,7 +54,7 @@ contract VerifierActivateConfigWithDeactivatedConfigTest is BaseTestWithMultiple
s_verifier.activateConfig(FEED_ID, s_configDigestTwo);
changePrank(address(s_verifierProxy));
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE_TWO + 1)
diff --git a/contracts/src/v0.8/llo-feeds/test/verifier/VerifierDeactivateFeedTest.t.sol b/contracts/src/v0.8/llo-feeds/test/verifier/VerifierDeactivateFeedTest.t.sol
index 985283fe22..fc6814d3bf 100644
--- a/contracts/src/v0.8/llo-feeds/test/verifier/VerifierDeactivateFeedTest.t.sol
+++ b/contracts/src/v0.8/llo-feeds/test/verifier/VerifierDeactivateFeedTest.t.sol
@@ -59,7 +59,7 @@ contract VerifierDeactivateFeedWithVerifyTest is BaseTestWithMultipleConfiguredD
s_verifier.activateFeed(FEED_ID);
changePrank(address(s_verifierProxy));
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
@@ -72,7 +72,7 @@ contract VerifierDeactivateFeedWithVerifyTest is BaseTestWithMultipleConfiguredD
changePrank(address(s_verifierProxy));
s_reportContext[0] = s_configDigestTwo;
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE_TWO + 1)
@@ -83,7 +83,7 @@ contract VerifierDeactivateFeedWithVerifyTest is BaseTestWithMultipleConfiguredD
function test_currentReportFailsVerification() public {
changePrank(address(s_verifierProxy));
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
@@ -97,7 +97,7 @@ contract VerifierDeactivateFeedWithVerifyTest is BaseTestWithMultipleConfiguredD
changePrank(address(s_verifierProxy));
s_reportContext[0] = s_configDigestTwo;
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE_TWO + 1)
diff --git a/contracts/src/v0.8/llo-feeds/test/verifier/VerifierTestBillingReport.t.sol b/contracts/src/v0.8/llo-feeds/test/verifier/VerifierTestBillingReport.t.sol
index c653374761..fffa291b0d 100644
--- a/contracts/src/v0.8/llo-feeds/test/verifier/VerifierTestBillingReport.t.sol
+++ b/contracts/src/v0.8/llo-feeds/test/verifier/VerifierTestBillingReport.t.sol
@@ -25,59 +25,55 @@ contract VerifierTestWithConfiguredVerifierAndFeeManager is BaseTestWithConfigur
contract VerifierTestBillingReport is VerifierTestWithConfiguredVerifierAndFeeManager {
function test_verifyWithLink() public {
- bytes memory signedReport = _generateEncodedBlobWithQuote(
+ bytes memory signedReport = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(link))
+ _getSigners(FAULT_TOLERANCE + 1)
);
_approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE, USER);
- _verify(signedReport, 0, USER);
+ _verify(signedReport, address(link), 0, USER);
assertEq(link.balanceOf(USER), DEFAULT_LINK_MINT_QUANTITY - DEFAULT_REPORT_LINK_FEE);
}
function test_verifyWithNative() public {
- bytes memory signedReport = _generateEncodedBlobWithQuote(
+ bytes memory signedReport = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
+ _getSigners(FAULT_TOLERANCE + 1)
);
_approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE, USER);
- _verify(signedReport, 0, USER);
+ _verify(signedReport, address(native), 0, USER);
assertEq(native.balanceOf(USER), DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE);
assertEq(link.balanceOf(address(rewardManager)), DEFAULT_REPORT_LINK_FEE);
}
function test_verifyWithNativeUnwrapped() public {
- bytes memory signedReport = _generateEncodedBlobWithQuote(
+ bytes memory signedReport = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
+ _getSigners(FAULT_TOLERANCE + 1)
);
- _verify(signedReport, DEFAULT_REPORT_NATIVE_FEE, USER);
+ _verify(signedReport, address(native), DEFAULT_REPORT_NATIVE_FEE, USER);
assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE);
assertEq(address(feeManager).balance, 0);
}
function test_verifyWithNativeUnwrappedReturnsChange() public {
- bytes memory signedReport = _generateEncodedBlobWithQuote(
+ bytes memory signedReport = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
+ _getSigners(FAULT_TOLERANCE + 1)
);
- _verify(signedReport, DEFAULT_REPORT_NATIVE_FEE * 2, USER);
+ _verify(signedReport, address(native), DEFAULT_REPORT_NATIVE_FEE * 2, USER);
assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE);
assertEq(address(feeManager).balance, 0);
@@ -88,11 +84,10 @@ contract VerifierBulkVerifyBillingReport is VerifierTestWithConfiguredVerifierAn
uint256 internal constant NUMBERS_OF_REPORTS = 5;
function test_verifyWithBulkLink() public {
- bytes memory signedReport = _generateEncodedBlobWithQuote(
+ bytes memory signedReport = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(link))
+ _getSigners(FAULT_TOLERANCE + 1)
);
bytes[] memory signedReports = new bytes[](NUMBERS_OF_REPORTS);
@@ -102,18 +97,17 @@ contract VerifierBulkVerifyBillingReport is VerifierTestWithConfiguredVerifierAn
_approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE * NUMBERS_OF_REPORTS, USER);
- _verifyBulk(signedReports, 0, USER);
+ _verifyBulk(signedReports, address(link), 0, USER);
assertEq(link.balanceOf(USER), DEFAULT_LINK_MINT_QUANTITY - DEFAULT_REPORT_LINK_FEE * NUMBERS_OF_REPORTS);
assertEq(link.balanceOf(address(rewardManager)), DEFAULT_REPORT_LINK_FEE * NUMBERS_OF_REPORTS);
}
function test_verifyWithBulkNative() public {
- bytes memory signedReport = _generateEncodedBlobWithQuote(
+ bytes memory signedReport = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
+ _getSigners(FAULT_TOLERANCE + 1)
);
bytes[] memory signedReports = new bytes[](NUMBERS_OF_REPORTS);
@@ -123,17 +117,16 @@ contract VerifierBulkVerifyBillingReport is VerifierTestWithConfiguredVerifierAn
_approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE * NUMBERS_OF_REPORTS, USER);
- _verifyBulk(signedReports, 0, USER);
+ _verifyBulk(signedReports, address(native), 0, USER);
assertEq(native.balanceOf(USER), DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * NUMBERS_OF_REPORTS);
}
function test_verifyWithBulkNativeUnwrapped() public {
- bytes memory signedReport = _generateEncodedBlobWithQuote(
+ bytes memory signedReport = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
+ _getSigners(FAULT_TOLERANCE + 1)
);
bytes[] memory signedReports = new bytes[](NUMBERS_OF_REPORTS);
@@ -141,18 +134,17 @@ contract VerifierBulkVerifyBillingReport is VerifierTestWithConfiguredVerifierAn
signedReports[i] = signedReport;
}
- _verifyBulk(signedReports, DEFAULT_REPORT_NATIVE_FEE * NUMBERS_OF_REPORTS, USER);
+ _verifyBulk(signedReports, address(native), DEFAULT_REPORT_NATIVE_FEE * NUMBERS_OF_REPORTS, USER);
assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * 5);
assertEq(address(feeManager).balance, 0);
}
function test_verifyWithBulkNativeUnwrappedReturnsChange() public {
- bytes memory signedReport = _generateEncodedBlobWithQuote(
+ bytes memory signedReport = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
+ _getSigners(FAULT_TOLERANCE + 1)
);
bytes[] memory signedReports = new bytes[](NUMBERS_OF_REPORTS);
@@ -160,176 +152,65 @@ contract VerifierBulkVerifyBillingReport is VerifierTestWithConfiguredVerifierAn
signedReports[i] = signedReport;
}
- _verifyBulk(signedReports, DEFAULT_REPORT_NATIVE_FEE * (NUMBERS_OF_REPORTS * 2), USER);
+ _verifyBulk(signedReports, address(native), DEFAULT_REPORT_NATIVE_FEE * (NUMBERS_OF_REPORTS * 2), USER);
assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * NUMBERS_OF_REPORTS);
assertEq(address(feeManager).balance, 0);
}
- function test_verifyBulkWithLinkAndWrappedNative() public {
- bytes memory linkReport = _generateEncodedBlobWithQuote(
- _generateV3Report(),
- _generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(link))
- );
-
- bytes memory nativeReport = _generateEncodedBlobWithQuote(
- _generateV3Report(),
- _generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
- );
-
- bytes[] memory signedReports = new bytes[](5);
-
- signedReports[0] = linkReport;
- signedReports[1] = linkReport;
- signedReports[2] = linkReport;
- signedReports[3] = nativeReport;
- signedReports[4] = nativeReport;
-
- _approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE * 3, USER);
- _approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE * 2, USER);
-
- _verifyBulk(signedReports, 0, USER);
-
- assertEq(native.balanceOf(USER), DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * 2);
- assertEq(link.balanceOf(USER), DEFAULT_LINK_MINT_QUANTITY - DEFAULT_REPORT_LINK_FEE * 3);
- assertEq(link.balanceOf(address(rewardManager)), DEFAULT_REPORT_LINK_FEE * 3);
- }
-
- function test_verifyBulkWithLinkAndUnwrappedNative() public {
- bytes memory linkReport = _generateEncodedBlobWithQuote(
- _generateV3Report(),
- _generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(link))
- );
-
- bytes memory nativeReport = _generateEncodedBlobWithQuote(
- _generateV3Report(),
- _generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
- );
-
- bytes[] memory signedReports = new bytes[](5);
-
- signedReports[0] = linkReport;
- signedReports[1] = linkReport;
- signedReports[2] = linkReport;
- signedReports[3] = nativeReport;
- signedReports[4] = nativeReport;
-
- _approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE * 3, USER);
-
- _verifyBulk(signedReports, DEFAULT_REPORT_NATIVE_FEE * 40, USER);
-
- //user should have some link returned as twice the amount was passed into msg.value
- assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * 2);
- assertEq(native.balanceOf(address(feeManager)), DEFAULT_REPORT_NATIVE_FEE * 2);
- assertEq(link.balanceOf(USER), DEFAULT_LINK_MINT_QUANTITY - DEFAULT_REPORT_LINK_FEE * 3);
- assertEq(link.balanceOf(address(rewardManager)), DEFAULT_REPORT_LINK_FEE * 3);
- }
-
- function test_verifyBulkReportWithUnwrappedAndWrappedNativeDefaultsToUnwrapped() public {
- bytes memory nativeReport1 = _generateEncodedBlobWithQuote(
- _generateV3Report(),
- _generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
- );
-
- bytes memory nativeReport2 = _generateEncodedBlobWithQuote(
- _generateV3Report(),
- _generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
- );
-
- bytes[] memory signedReports = new bytes[](2);
-
- signedReports[0] = nativeReport1;
- signedReports[1] = nativeReport2;
-
- _verifyBulk(signedReports, DEFAULT_REPORT_NATIVE_FEE * 2, USER);
-
- assertEq(USER.balance, DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE * 2);
- assertEq(native.balanceOf(USER), DEFAULT_NATIVE_MINT_QUANTITY);
- }
-
function test_verifyMultiVersions() public {
- bytes memory signedReportV1 = _generateEncodedBlob(
+ bytes memory signedReportV1 = _generateV1EncodedBlob(
_generateV1Report(),
_generateReportContext(v1ConfigDigest),
_getSigners(FAULT_TOLERANCE + 1)
);
- bytes memory signedReportV3Link = _generateEncodedBlobWithQuote(
+ bytes memory signedReportV3 = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(link))
- );
-
- bytes memory signedReportV3Native = _generateEncodedBlobWithQuote(
- _generateV3Report(),
- _generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
+ _getSigners(FAULT_TOLERANCE + 1)
);
bytes[] memory signedReports = new bytes[](3);
signedReports[0] = signedReportV1;
- signedReports[1] = signedReportV3Link;
- signedReports[2] = signedReportV3Native;
+ signedReports[1] = signedReportV3;
+ signedReports[2] = signedReportV3;
- _approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE, USER);
- _approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE, USER);
+ _approveLink(address(rewardManager), 2 * DEFAULT_REPORT_LINK_FEE, USER);
- _verifyBulk(signedReports, 0, USER);
+ _verifyBulk(signedReports, address(link), 0, USER);
- assertEq(link.balanceOf(USER), DEFAULT_LINK_MINT_QUANTITY - DEFAULT_REPORT_LINK_FEE);
- assertEq(native.balanceOf(USER), DEFAULT_NATIVE_MINT_QUANTITY - DEFAULT_REPORT_NATIVE_FEE);
+ assertEq(link.balanceOf(USER), DEFAULT_LINK_MINT_QUANTITY - 2 * DEFAULT_REPORT_LINK_FEE);
+ assertEq(native.balanceOf(USER), DEFAULT_NATIVE_MINT_QUANTITY);
assertEq(link.balanceOf(address(rewardManager)), DEFAULT_REPORT_LINK_FEE * 2);
}
function test_verifyMultiVersionsReturnsVerifiedReports() public {
- bytes memory signedReportV1 = _generateEncodedBlob(
+ bytes memory signedReportV1 = _generateV1EncodedBlob(
_generateV1Report(),
_generateReportContext(v1ConfigDigest),
_getSigners(FAULT_TOLERANCE + 1)
);
- bytes memory signedReportV3Link = _generateEncodedBlobWithQuote(
- _generateV3Report(),
- _generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(link))
- );
-
- bytes memory signedReportV3Native = _generateEncodedBlobWithQuote(
+ bytes memory signedReportV3 = _generateV3EncodedBlob(
_generateV3Report(),
_generateReportContext(v3ConfigDigest),
- _getSigners(FAULT_TOLERANCE + 1),
- _generateQuote(address(native))
+ _getSigners(FAULT_TOLERANCE + 1)
);
bytes[] memory signedReports = new bytes[](3);
signedReports[0] = signedReportV1;
- signedReports[1] = signedReportV3Link;
- signedReports[2] = signedReportV3Native;
+ signedReports[1] = signedReportV3;
+ signedReports[2] = signedReportV3;
- _approveLink(address(rewardManager), DEFAULT_REPORT_LINK_FEE, USER);
- _approveNative(address(feeManager), DEFAULT_REPORT_NATIVE_FEE, USER);
+ _approveLink(address(rewardManager), 2 * DEFAULT_REPORT_LINK_FEE, USER);
address originalAddr = msg.sender;
changePrank(USER);
- bytes[] memory verifierReports = s_verifierProxy.verifyBulk{value: 0}(signedReports);
+ bytes[] memory verifierReports = s_verifierProxy.verifyBulk{value: 0}(signedReports, abi.encode(link));
changePrank(originalAddr);
diff --git a/contracts/src/v0.8/llo-feeds/test/verifier/VerifierVerifyTest.t.sol b/contracts/src/v0.8/llo-feeds/test/verifier/VerifierVerifyTest.t.sol
index 149ac71feb..b4fcac75d3 100644
--- a/contracts/src/v0.8/llo-feeds/test/verifier/VerifierVerifyTest.t.sol
+++ b/contracts/src/v0.8/llo-feeds/test/verifier/VerifierVerifyTest.t.sol
@@ -57,23 +57,23 @@ contract VerifierVerifyTest is BaseTestWithConfiguredVerifierAndFeeManager {
contract VerifierProxyVerifyTest is VerifierVerifyTest {
function test_revertsIfNoVerifierConfigured() public {
s_reportContext[0] = bytes32("corrupt-digest");
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
);
vm.expectRevert(abi.encodeWithSelector(VerifierProxy.VerifierNotFound.selector, bytes32("corrupt-digest")));
- s_verifierProxy.verify(signedReport);
+ s_verifierProxy.verify(signedReport, bytes(""));
}
function test_proxiesToTheCorrectVerifier() public {
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
);
- bytes memory response = s_verifierProxy.verify(signedReport);
+ bytes memory response = s_verifierProxy.verify(signedReport, abi.encode(native));
assertReportsEqual(response, s_testReportOne);
}
}
@@ -92,7 +92,7 @@ contract VerifierProxyAccessControlledVerificationTest is VerifierVerifyTest {
abi.encodeWithSelector(AccessControllerInterface.hasAccess.selector, USER),
abi.encode(false)
);
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
@@ -100,7 +100,7 @@ contract VerifierProxyAccessControlledVerificationTest is VerifierVerifyTest {
vm.expectRevert(abi.encodeWithSelector(VerifierProxy.AccessForbidden.selector));
changePrank(USER);
- s_verifierProxy.verify(signedReport);
+ s_verifierProxy.verify(signedReport, abi.encode(native));
}
function test_proxiesToTheVerifierIfHasAccess() public {
@@ -110,21 +110,21 @@ contract VerifierProxyAccessControlledVerificationTest is VerifierVerifyTest {
abi.encode(true)
);
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
);
changePrank(USER);
- bytes memory response = s_verifierProxy.verify(signedReport);
+ bytes memory response = s_verifierProxy.verify(signedReport, bytes(""));
assertReportsEqual(response, s_testReportOne);
}
}
contract VerifierVerifySingleConfigDigestTest is VerifierVerifyTest {
function test_revertsIfVerifiedByNonProxy() public {
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
@@ -136,7 +136,7 @@ contract VerifierVerifySingleConfigDigestTest is VerifierVerifyTest {
function test_revertsIfVerifiedWithIncorrectAddresses() public {
Signer[] memory signers = _getSigners(FAULT_TOLERANCE + 1);
signers[10].mockPrivateKey = 1234;
- bytes memory signedReport = _generateEncodedBlob(s_testReportOne, s_reportContext, signers);
+ bytes memory signedReport = _generateV1EncodedBlob(s_testReportOne, s_reportContext, signers);
changePrank(address(s_verifierProxy));
vm.expectRevert(abi.encodeWithSelector(Verifier.BadVerification.selector));
s_verifier.verify(signedReport, msg.sender);
@@ -155,7 +155,11 @@ contract VerifierVerifySingleConfigDigestTest is VerifierVerifyTest {
function test_revertsIfConfigDigestNotSet() public {
bytes32[3] memory reportContext = s_reportContext;
reportContext[0] = bytes32("wrong-context-digest");
- bytes memory signedReport = _generateEncodedBlob(s_testReportOne, reportContext, _getSigners(FAULT_TOLERANCE + 1));
+ bytes memory signedReport = _generateV1EncodedBlob(
+ s_testReportOne,
+ reportContext,
+ _getSigners(FAULT_TOLERANCE + 1)
+ );
vm.expectRevert(abi.encodeWithSelector(Verifier.DigestInactive.selector, FEED_ID, reportContext[0]));
changePrank(address(s_verifierProxy));
s_verifier.verify(signedReport, msg.sender);
@@ -173,14 +177,14 @@ contract VerifierVerifySingleConfigDigestTest is VerifierVerifyTest {
BLOCKNUMBER_LOWER_BOUND,
uint32(block.timestamp)
);
- bytes memory signedReport = _generateEncodedBlob(report, s_reportContext, _getSigners(FAULT_TOLERANCE + 1));
+ bytes memory signedReport = _generateV1EncodedBlob(report, s_reportContext, _getSigners(FAULT_TOLERANCE + 1));
vm.expectRevert(abi.encodeWithSelector(Verifier.DigestInactive.selector, FEED_ID_2, s_reportContext[0]));
changePrank(address(s_verifierProxy));
s_verifier.verify(signedReport, msg.sender);
}
function test_revertsIfWrongNumberOfSigners() public {
- bytes memory signedReport = _generateEncodedBlob(s_testReportOne, s_reportContext, _getSigners(10));
+ bytes memory signedReport = _generateV1EncodedBlob(s_testReportOne, s_reportContext, _getSigners(10));
vm.expectRevert(abi.encodeWithSelector(Verifier.IncorrectSignatureCount.selector, 10, FAULT_TOLERANCE + 1));
changePrank(address(s_verifierProxy));
s_verifier.verify(signedReport, msg.sender);
@@ -190,14 +194,14 @@ contract VerifierVerifySingleConfigDigestTest is VerifierVerifyTest {
Signer[] memory signers = _getSigners(FAULT_TOLERANCE + 1);
// Duplicate signer at index 1
signers[0] = signers[1];
- bytes memory signedReport = _generateEncodedBlob(s_testReportOne, s_reportContext, signers);
+ bytes memory signedReport = _generateV1EncodedBlob(s_testReportOne, s_reportContext, signers);
vm.expectRevert(abi.encodeWithSelector(Verifier.BadVerification.selector));
changePrank(address(s_verifierProxy));
s_verifier.verify(signedReport, msg.sender);
}
function test_returnsThePriceAndBlockNumIfReportVerified() public {
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
@@ -210,7 +214,7 @@ contract VerifierVerifySingleConfigDigestTest is VerifierVerifyTest {
function test_setsTheCorrectEpoch() public {
s_reportContext[1] = bytes32(uint256(5 << 8));
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
@@ -223,7 +227,7 @@ contract VerifierVerifySingleConfigDigestTest is VerifierVerifyTest {
}
function test_emitsAnEventIfReportVerified() public {
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
@@ -260,7 +264,7 @@ contract VerifierVerifyMultipleConfigDigestTest is VerifierVerifyTest {
function test_revertsIfVerifyingWithAnUnsetDigest() public {
s_verifier.deactivateConfig(FEED_ID, (s_oldConfigDigest));
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
@@ -271,7 +275,7 @@ contract VerifierVerifyMultipleConfigDigestTest is VerifierVerifyTest {
}
function test_canVerifyOlderReportsWithOlderConfigs() public {
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE + 1)
@@ -283,7 +287,7 @@ contract VerifierVerifyMultipleConfigDigestTest is VerifierVerifyTest {
function test_canVerifyNewerReportsWithNewerConfigs() public {
s_reportContext[0] = s_newConfigDigest;
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE_TWO + 1)
@@ -296,7 +300,7 @@ contract VerifierVerifyMultipleConfigDigestTest is VerifierVerifyTest {
function test_revertsIfAReportIsVerifiedWithAnExistingButIncorrectDigest() public {
// Try sending the older digest signed with the new set of signers
s_reportContext[0] = s_oldConfigDigest;
- bytes memory signedReport = _generateEncodedBlob(
+ bytes memory signedReport = _generateV1EncodedBlob(
s_testReportOne,
s_reportContext,
_getSigners(FAULT_TOLERANCE_TWO + 1)
diff --git a/core/gethwrappers/llo-feeds/generated/fee_manager/fee_manager.go b/core/gethwrappers/llo-feeds/generated/fee_manager/fee_manager.go
index 43f2844adc..76ace812c0 100644
--- a/core/gethwrappers/llo-feeds/generated/fee_manager/fee_manager.go
+++ b/core/gethwrappers/llo-feeds/generated/fee_manager/fee_manager.go
@@ -40,18 +40,14 @@ type CommonAsset struct {
Amount *big.Int
}
-type IFeeManagerQuote struct {
- QuoteAddress common.Address
-}
-
type IRewardManagerFeePayment struct {
PoolId [32]byte
Amount *big.Int
}
var FeeManagerMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_linkAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_nativeAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_proxyAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rewardManagerAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ExpiredReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDiscount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidQuote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReceivingAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSurcharge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeficit\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structCommon.Asset\",\"name\":\"fee\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structCommon.Asset\",\"name\":\"reward\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"appliedDiscount\",\"type\":\"uint256\"}],\"name\":\"DiscountApplied\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"}],\"indexed\":false,\"internalType\":\"structIRewardManager.FeePayment[]\",\"name\":\"rewards\",\"type\":\"tuple[]\"}],\"name\":\"InsufficientLink\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"linkQuantity\",\"type\":\"uint256\"}],\"name\":\"LinkDeficitCleared\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newSurcharge\",\"type\":\"uint64\"}],\"name\":\"NativeSurchargeUpdated\",\"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\":\"subscriber\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"discount\",\"type\":\"uint64\"}],\"name\":\"SubscriberDiscountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"quantity\",\"type\":\"uint192\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"quoteAddress\",\"type\":\"address\"}],\"internalType\":\"structIFeeManager.Quote\",\"name\":\"quote\",\"type\":\"tuple\"}],\"name\":\"getFeeAndReward\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structCommon.Asset\",\"name\":\"\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structCommon.Asset\",\"name\":\"\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_linkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_nativeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_proxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_rewardManager\",\"outputs\":[{\"internalType\":\"contractIRewardManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkAvailableForPayment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"payLinkDeficit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"}],\"name\":\"processFee\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"payloads\",\"type\":\"bytes[]\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"}],\"name\":\"processFeeBulk\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"s_linkDeficit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_nativeSurcharge\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"s_subscriberDiscounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structCommon.AddressAndWeight[]\",\"name\":\"rewardRecipientAndWeights\",\"type\":\"tuple[]\"}],\"name\":\"setFeeRecipients\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"surcharge\",\"type\":\"uint64\"}],\"name\":\"setNativeSurcharge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"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\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"discount\",\"type\":\"uint64\"}],\"name\":\"updateSubscriberDiscount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint192\",\"name\":\"quantity\",\"type\":\"uint192\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
- Bin: "0x6101006040523480156200001257600080fd5b506040516200363b3803806200363b833981016040819052620000359162000288565b33806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620001c0565b5050506001600160a01b0384161580620000e057506001600160a01b038316155b80620000f357506001600160a01b038216155b806200010657506001600160a01b038116155b15620001255760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b03848116608081905284821660a05283821660c05290821660e081905260405163095ea7b360e01b81526004810191909152600019602482015263095ea7b3906044016020604051808303816000875af11580156200018f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001b59190620002e5565b505050505062000310565b336001600160a01b038216036200021a5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200028357600080fd5b919050565b600080600080608085870312156200029f57600080fd5b620002aa856200026b565b9350620002ba602086016200026b565b9250620002ca604086016200026b565b9150620002da606086016200026b565b905092959194509250565b600060208284031215620002f857600080fd5b815180151581146200030957600080fd5b9392505050565b60805160a05160c05160e051613249620003f260003960008181610275015281816112cc015281816115ed01528181611e290152612077015260008181610335015281816107610152818161138c015261153301526000818161030101528181610bc101528181610c1801528181610ecf01528181610fde01528181611d4f0152611df80152600081816104a7015281816108da01528181610be601528181610c7301528181610dbd01528181610e2c01528181610e6b01528181610f870152818161111e01528181611496015281816119ca0152611eea01526132496000f3fe60806040526004361061016a5760003560e01c806379ba5097116100cb578063d09dc3391161007f578063f1387e1611610059578063f1387e16146104c9578063f2fde38b146104dc578063f65df962146104fc57600080fd5b8063d09dc33914610460578063e389d9a414610475578063ea4b861b1461049557600080fd5b80638da5cb5b116100b05780638da5cb5b146103aa578063c541cbde146103d5578063ce7817d11461044057600080fd5b806379ba50971461035757806387d6d8431461036c57600080fd5b80633aa5ac0711610122578063505380941161010757806350538094146102cf57806363878668146102ef5780636d1342cb1461032357600080fd5b80633aa5ac071461026357806340d7f78e146102bc57600080fd5b8063181f5a7711610153578063181f5a77146101df5780631d4d84a21461022b57806332f5f7461461024d57600080fd5b8063013f542b1461016f57806301ffc9a7146101af575b600080fd5b34801561017b57600080fd5b5061019c61018a366004612679565b60036020526000908152604090205481565b6040519081526020015b60405180910390f35b3480156101bb57600080fd5b506101cf6101ca366004612692565b61051c565b60405190151581526020016101a6565b3480156101eb57600080fd5b50604080518082018252601081527f4665654d616e6167657220312e302e3000000000000000000000000000000000602082015290516101a691906126f8565b34801561023757600080fd5b5061024b610246366004612791565b6105b5565b005b34801561025957600080fd5b5061019c60045481565b34801561026f57600080fd5b506102977f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a6565b61024b6102ca3660046127dc565b610749565b3480156102db57600080fd5b5061024b6102ea366004612874565b61098c565b3480156102fb57600080fd5b506102977f000000000000000000000000000000000000000000000000000000000000000081565b34801561032f57600080fd5b506102977f000000000000000000000000000000000000000000000000000000000000000081565b34801561036357600080fd5b5061024b610a26565b34801561037857600080fd5b5061019c61038736600461288f565b600260209081526000938452604080852082529284528284209052825290205481565b3480156103b657600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610297565b3480156103e157600080fd5b506103f56103f03660046129fb565b610b28565b60408051845173ffffffffffffffffffffffffffffffffffffffff9081168252602095860151868301528451169181019190915292909101516060830152608082015260a0016101a6565b34801561044c57600080fd5b5061024b61045b366004612a9c565b610f31565b34801561046c57600080fd5b5061019c6110ed565b34801561048157600080fd5b5061024b610490366004612679565b6111a3565b3480156104a157600080fd5b506102977f000000000000000000000000000000000000000000000000000000000000000081565b61024b6104d7366004612aed565b611374565b3480156104e857600080fd5b5061024b6104f7366004612b4f565b611507565b34801561050857600080fd5b5061024b610517366004612b6c565b61151b565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167ff1387e160000000000000000000000000000000000000000000000000000000014806105af57507fffffffff0000000000000000000000000000000000000000000000000000000082167f40d7f78e00000000000000000000000000000000000000000000000000000000145b92915050565b6105bd611654565b73ffffffffffffffffffffffffffffffffffffffff83166106925760008273ffffffffffffffffffffffffffffffffffffffff168277ffffffffffffffffffffffffffffffffffffffffffffffff1660405160006040518083038185875af1925050503d806000811461064c576040519150601f19603f3d011682016040523d82523d6000602084013e610651565b606091505b505090508061068c576040517fef2af20100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6106cd73ffffffffffffffffffffffffffffffffffffffff84168377ffffffffffffffffffffffffffffffffffffffffffffffff84166116d7565b6040805133815273ffffffffffffffffffffffffffffffffffffffff848116602083015285168183015277ffffffffffffffffffffffffffffffffffffffffffffffff8316606082015290517f7ff78a71698bdb18dcca96f52ab25e0a1b146fb6a49adf8e6845299e49021f299181900360800190a15b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146107b8576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008267ffffffffffffffff8111156107d3576107d36128c6565b60405190808252806020026020018201604052801561080c57816020015b6107f96125ec565b8152602001906001900390816107f15790505b5090506000806000805b868110156109555760008060006108508b8b8681811061083857610838612beb565b905060200281019061084a9190612c1a565b8b6117ab565b92509250925082602001516000146109415760405180608001604052808c8c8781811061087f5761087f612beb565b90506020028101906108919190612c1a565b61089a91612c86565b8152602001848152602001838152602001828152508886806108bb90612cf1565b9750815181106108cd576108cd612beb565b60200260200101819052507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff160361093a57866001019650610941565b8560010195505b5050508061094e90612cf1565b9050610816565b508215158061096357508115155b1561097957610974858585856118e5565b610983565b61098385346120f9565b50505050505050565b610994611654565b670de0b6b3a764000067ffffffffffffffff821611156109e0576040517f05e8ac2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff811660048190556040519081527f08f7c0d17932ddb8523bc06754d42ff19ebc77d76a8b9bfde02c28ab1ed3d6399060200160405180910390a150565b60015473ffffffffffffffffffffffffffffffffffffffff163314610aac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6040805180820182526000808252602080830182905283518085018552828152808201839052845180860186528381528083018490528551808701909652838652918501839052929382610b7b88612d29565b90507fffff000000000000000000000000000000000000000000000000000000000000808216908101610c1657505073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811683527f0000000000000000000000000000000000000000000000000000000000000000168152909350915060009050610f28565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16886000015173ffffffffffffffffffffffffffffffffffffffff1614158015610cc657507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16886000015173ffffffffffffffffffffffffffffffffffffffff1614155b15610cfd576040517ff861803000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008b806020019051810190610d169190612d82565b77ffffffffffffffffffffffffffffffffffffffffffffffff91821698509116955063ffffffff1693505050428210159050610d7e576040517fb6c405f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808e16600090815260026020908152604080832089845282528083208f51851684529091529020547f00000000000000000000000000000000000000000000000000000000000000009091168752610e0e610df682670de0b6b3a7640000612df4565b610e009086612e07565b670de0b6b3a7640000612146565b60208801528b5173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116911603610e9c5773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016885260208088015190890152610f19565b600454600090610eb890610df690670de0b6b3a7640000612e44565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168a529050610f12610f0883670de0b6b3a7640000612df4565b610e009083612e07565b60208a0152505b96995094975094955050505050505b93509350939050565b610f39611654565b670de0b6b3a764000067ffffffffffffffff82161115610f85576040517f997ea36000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561102d57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611064576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff848116600081815260026020908152604080832088845282528083209487168084529482529182902067ffffffffffffffff86169081905582519485529084015285927f5eba5a8afa39780f0f99b6cbeb95f3da6a7040ca00abd46bdc91a0a060134139910160405180910390a350505050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561117a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119e9190612e57565b905090565b6111ab611654565b600081815260036020526040812054908190036111f4576040517f03aad31200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600360205260408082208290558051600180825281830190925290816020015b604080518082019091526000808252602082015281526020019060019003908161121957905050905060405180604001604052808481526020018377ffffffffffffffffffffffffffffffffffffffffffffffff168152508160008151811061128457611284612beb565b60209081029190910101526040517fb0d9fa1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063b0d9fa19906113039084903090600401612ed0565b600060405180830381600087803b15801561131d57600080fd5b505af1158015611331573d6000803e3d6000fd5b50505050827f843f0b103e50b42b08f9d30f12f961845a6d02623730872e24644899c0dd98958360405161136791815260200190565b60405180910390a2505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146113e3576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060006113f38686866117ab565b92509250925082602001516000036114175761140f84346120f9565b505050505050565b604080516001808252818301909252600091816020015b6114366125ec565b81526020019060019003908161142e575050604080516080810190915290915080611461888a612c86565b8152602001858152602001848152602001838152508160008151811061148957611489612beb565b60200260200101819052507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16846000015173ffffffffffffffffffffffffffffffffffffffff16036114f9576109748582600160006118e5565b6109838582600060016118e5565b61150f611654565b6115188161217e565b50565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801590611579575060005473ffffffffffffffffffffffffffffffffffffffff163314155b156115b0576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f14060f2300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906314060f239061162690869086908690600401612f08565b600060405180830381600087803b15801561164057600080fd5b505af1158015610983573d6000803e3d6000fd5b60005473ffffffffffffffffffffffffffffffffffffffff1633146116d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610aa3565b565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526107449084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612273565b6040805180820190915260008082526020820152604080518082019091526000808252602082015260003073ffffffffffffffffffffffffffffffffffffffff851603611824576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061183286880188612ff6565b91505060008161184190612d29565b6040805160208101909152600081529091507e010000000000000000000000000000000000000000000000000000000000007fffff0000000000000000000000000000000000000000000000000000000000008316146118c85760006118a9898b018b6130ba565b95505050505050808060200190518101906118c49190613182565b9150505b6118d3878483610b28565b95509550955050505093509350939050565b60008267ffffffffffffffff811115611900576119006128c6565b60405190808252806020026020018201604052801561194557816020015b604080518082019091526000808252602082015281526020019060019003908161191e5790505b50905060008267ffffffffffffffff811115611963576119636128c6565b6040519080825280602002602001820160405280156119a857816020015b60408051808201909152600080825260208201528152602001906001900390816119815790505b5090506000808080806119bb888a612e44565b905060005b81811015611d0a577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168b8281518110611a1157611a11612beb565b6020026020010151602001516000015173ffffffffffffffffffffffffffffffffffffffff1603611ad75760405180604001604052808c8381518110611a5957611a59612beb565b60200260200101516000015181526020018c8381518110611a7c57611a7c612beb565b6020026020010151604001516020015177ffffffffffffffffffffffffffffffffffffffffffffffff16815250888580611ab590612cf1565b965081518110611ac757611ac7612beb565b6020026020010181905250611bcc565b60405180604001604052808c8381518110611af457611af4612beb565b60200260200101516000015181526020018c8381518110611b1757611b17612beb565b6020026020010151604001516020015177ffffffffffffffffffffffffffffffffffffffffffffffff16815250878480611b5090612cf1565b955081518110611b6257611b62612beb565b60200260200101819052508a8181518110611b7f57611b7f612beb565b6020026020010151602001516020015186611b9a9190612e44565b95508a8181518110611bae57611bae612beb565b6020026020010151604001516020015185611bc99190612e44565b94505b8a8181518110611bde57611bde612beb565b602002602001015160600151600014611cfa578b73ffffffffffffffffffffffffffffffffffffffff168b8281518110611c1a57611c1a612beb565b6020026020010151600001517f88b15eb682210089cddf967648e2cb2a4535aeadc8f8f36050922e33c04e71258d8481518110611c5957611c59612beb565b6020026020010151602001518e8581518110611c7757611c77612beb565b6020026020010151604001518f8681518110611c9557611c95612beb565b602002602001015160600151604051611cf193929190835173ffffffffffffffffffffffffffffffffffffffff908116825260209485015185830152835116604082015291909201516060820152608081019190915260a00190565b60405180910390a35b611d0381612cf1565b90506119c0565b5060003415611dd85734861115611d4d576040517fb2e532de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0876040518263ffffffff1660e01b81526004016000604051808303818588803b158015611db557600080fd5b505af1158015611dc9573d6000803e3d6000fd5b50505050508534039050611e20565b8515611e2057611e2073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168d308961237f565b875115611eb5577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b0d9fa19898e6040518363ffffffff1660e01b8152600401611e82929190612ed0565b600060405180830381600087803b158015611e9c57600080fd5b505af1158015611eb0573d6000803e3d6000fd5b505050505b8651156120e1576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a9190612e57565b85111561203a5760005b8751811015611ffd57878181518110611f8f57611f8f612beb565b60200260200101516020015177ffffffffffffffffffffffffffffffffffffffffffffffff16600360008a8481518110611fcb57611fcb612beb565b60209081029190910181015151825281019190915260400160002080549091019055611ff681612cf1565b9050611f74565b507ff52e5907b69d97c33392936c12d78b494463b78c5b72df50b4c497eee5720b678760405161202d91906131b0565b60405180910390a16120e1565b6040517fb0d9fa1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063b0d9fa19906120ae908a903090600401612ed0565b600060405180830381600087803b1580156120c857600080fd5b505af11580156120dc573d6000803e3d6000fd5b505050505b6120eb8c826120f9565b505050505050505050505050565b80156121425760405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610744573d6000803e3d6000fd5b5050565b60008215612174578161215a600185612df4565b61216491906131c3565b61216f906001612e44565b612177565b60005b9392505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036121fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610aa3565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006122d5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166123dd9092919063ffffffff16565b80519091501561074457808060200190518101906122f391906131fe565b610744576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610aa3565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261068c9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611729565b60606123ec84846000856123f4565b949350505050565b606082471015612486576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610aa3565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516124af9190613220565b60006040518083038185875af1925050503d80600081146124ec576040519150601f19603f3d011682016040523d82523d6000602084013e6124f1565b606091505b50915091506125028783838761250d565b979650505050505050565b606083156125a357825160000361259c5773ffffffffffffffffffffffffffffffffffffffff85163b61259c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610aa3565b50816123ec565b6123ec83838151156125b85781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa391906126f8565b6040518060800160405280600080191681526020016126346040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b815260200161266c6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b8152602001600081525090565b60006020828403121561268b57600080fd5b5035919050565b6000602082840312156126a457600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461217757600080fd5b60005b838110156126ef5781810151838201526020016126d7565b50506000910152565b60208152600082518060208401526127178160408501602087016126d4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b73ffffffffffffffffffffffffffffffffffffffff8116811461151857600080fd5b77ffffffffffffffffffffffffffffffffffffffffffffffff8116811461151857600080fd5b6000806000606084860312156127a657600080fd5b83356127b181612749565b925060208401356127c181612749565b915060408401356127d18161276b565b809150509250925092565b6000806000604084860312156127f157600080fd5b833567ffffffffffffffff8082111561280957600080fd5b818601915086601f83011261281d57600080fd5b81358181111561282c57600080fd5b8760208260051b850101111561284157600080fd5b602092830195509350508401356127d181612749565b803567ffffffffffffffff8116811461286f57600080fd5b919050565b60006020828403121561288657600080fd5b61217782612857565b6000806000606084860312156128a457600080fd5b83356128af81612749565b92506020840135915060408401356127d181612749565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516020810167ffffffffffffffff81118282101715612918576129186128c6565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612965576129656128c6565b604052919050565b600082601f83011261297e57600080fd5b813567ffffffffffffffff811115612998576129986128c6565b6129c960207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161291e565b8181528460208386010111156129de57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008385036060811215612a1157600080fd5b8435612a1c81612749565b9350602085013567ffffffffffffffff811115612a3857600080fd5b612a448782880161296d565b93505060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc082011215612a7757600080fd5b50612a806128f5565b6040850135612a8e81612749565b815292959194509192509050565b60008060008060808587031215612ab257600080fd5b8435612abd81612749565b9350602085013592506040850135612ad481612749565b9150612ae260608601612857565b905092959194509250565b600080600060408486031215612b0257600080fd5b833567ffffffffffffffff80821115612b1a57600080fd5b818601915086601f830112612b2e57600080fd5b813581811115612b3d57600080fd5b87602082850101111561284157600080fd5b600060208284031215612b6157600080fd5b813561217781612749565b600080600060408486031215612b8157600080fd5b83359250602084013567ffffffffffffffff80821115612ba057600080fd5b818601915086601f830112612bb457600080fd5b813581811115612bc357600080fd5b8760208260061b8501011115612bd857600080fd5b6020830194508093505050509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612c4f57600080fd5b83018035915067ffffffffffffffff821115612c6a57600080fd5b602001915036819003821315612c7f57600080fd5b9250929050565b803560208310156105af577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d2257612d22612cc2565b5060010190565b80516020808301519190811015612d68577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160200360031b1b821691505b50919050565b805163ffffffff8116811461286f57600080fd5b60008060008060008060c08789031215612d9b57600080fd5b86519550612dab60208801612d6e565b9450612db960408801612d6e565b93506060870151612dc98161276b565b6080880151909350612dda8161276b565b9150612de860a08801612d6e565b90509295509295509295565b818103818111156105af576105af612cc2565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612e3f57612e3f612cc2565b500290565b808201808211156105af576105af612cc2565b600060208284031215612e6957600080fd5b5051919050565b600081518084526020808501945080840160005b83811015612ec55781518051885283015177ffffffffffffffffffffffffffffffffffffffffffffffff168388015260409096019590820190600101612e84565b509495945050505050565b604081526000612ee36040830185612e70565b905073ffffffffffffffffffffffffffffffffffffffff831660208301529392505050565b8381526040602080830182905282820184905260009190859060608501845b87811015612f7b578335612f3a81612749565b73ffffffffffffffffffffffffffffffffffffffff16825267ffffffffffffffff612f66858501612857565b16828401529284019290840190600101612f27565b5098975050505050505050565b600082601f830112612f9957600080fd5b6040516060810181811067ffffffffffffffff82111715612fbc57612fbc6128c6565b604052806060840185811115612fd157600080fd5b845b81811015612feb578035835260209283019201612fd3565b509195945050505050565b6000806080838503121561300957600080fd5b6130138484612f88565b9150606083013567ffffffffffffffff81111561302f57600080fd5b61303b8582860161296d565b9150509250929050565b600082601f83011261305657600080fd5b8135602067ffffffffffffffff821115613072576130726128c6565b8160051b61308182820161291e565b928352848101820192828101908785111561309b57600080fd5b83870192505b84831015612502578235825291830191908301906130a1565b60008060008060008061010087890312156130d457600080fd5b6130de8888612f88565b9550606087013567ffffffffffffffff808211156130fb57600080fd5b6131078a838b0161296d565b9650608089013591508082111561311d57600080fd5b6131298a838b01613045565b955060a089013591508082111561313f57600080fd5b61314b8a838b01613045565b945060c0890135935060e089013591508082111561316857600080fd5b5061317589828a0161296d565b9150509295509295509295565b60006020828403121561319457600080fd5b61319c6128f5565b82516131a781612749565b81529392505050565b6020815260006121776020830184612e70565b6000826131f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561321057600080fd5b8151801515811461217757600080fd5b600082516132328184602087016126d4565b919091019291505056fea164736f6c6343000810000a",
+ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_linkAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_nativeAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_proxyAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rewardManagerAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ExpiredReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDiscount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidQuote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReceivingAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSurcharge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroDeficit\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structCommon.Asset\",\"name\":\"fee\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structCommon.Asset\",\"name\":\"reward\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"appliedDiscount\",\"type\":\"uint256\"}],\"name\":\"DiscountApplied\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"}],\"indexed\":false,\"internalType\":\"structIRewardManager.FeePayment[]\",\"name\":\"rewards\",\"type\":\"tuple[]\"}],\"name\":\"InsufficientLink\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"linkQuantity\",\"type\":\"uint256\"}],\"name\":\"LinkDeficitCleared\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newSurcharge\",\"type\":\"uint64\"}],\"name\":\"NativeSurchargeUpdated\",\"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\":\"subscriber\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"discount\",\"type\":\"uint64\"}],\"name\":\"SubscriberDiscountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"quantity\",\"type\":\"uint192\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"quoteAddress\",\"type\":\"address\"}],\"name\":\"getFeeAndReward\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structCommon.Asset\",\"name\":\"\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structCommon.Asset\",\"name\":\"\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_linkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_nativeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_proxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_rewardManager\",\"outputs\":[{\"internalType\":\"contractIRewardManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkAvailableForPayment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"payLinkDeficit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"parameterPayload\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"}],\"name\":\"processFee\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"payloads\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"parameterPayload\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"}],\"name\":\"processFeeBulk\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"s_linkDeficit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_nativeSurcharge\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"s_subscriberDiscounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structCommon.AddressAndWeight[]\",\"name\":\"rewardRecipientAndWeights\",\"type\":\"tuple[]\"}],\"name\":\"setFeeRecipients\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"surcharge\",\"type\":\"uint64\"}],\"name\":\"setNativeSurcharge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"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\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"discount\",\"type\":\"uint64\"}],\"name\":\"updateSubscriberDiscount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint192\",\"name\":\"quantity\",\"type\":\"uint192\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ Bin: "0x6101006040523480156200001257600080fd5b506040516200349938038062003499833981016040819052620000359162000288565b33806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620001c0565b5050506001600160a01b0384161580620000e057506001600160a01b038316155b80620000f357506001600160a01b038216155b806200010657506001600160a01b038116155b15620001255760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b03848116608081905284821660a05283821660c05290821660e081905260405163095ea7b360e01b81526004810191909152600019602482015263095ea7b3906044016020604051808303816000875af11580156200018f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001b59190620002e5565b505050505062000310565b336001600160a01b038216036200021a5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200028357600080fd5b919050565b600080600080608085870312156200029f57600080fd5b620002aa856200026b565b9350620002ba602086016200026b565b9250620002ca604086016200026b565b9150620002da606086016200026b565b905092959194509250565b600060208284031215620002f857600080fd5b815180151581146200030957600080fd5b9392505050565b60805160a05160c05160e0516130a7620003f26000396000818161027501528181611462015281816115f001528181611e0b0152612059015260008181610335015281816107fb01528181610db601526115360152600081816102ee01528181610bd901528181610fd30152818161102a015281816112d701528181611d310152611dda0152600081816104ba0152818161097601528181610b8201528181610d1901528181610ec201528181610ff801528181611081015281816111c60152818161123301528181611273015281816119ac0152611ecc01526130a76000f3fe60806040526004361061016a5760003560e01c806379ba5097116100cb578063dba45fe01161007f578063ea4b861b11610059578063ea4b861b146104a8578063f2fde38b146104dc578063f65df962146104fc57600080fd5b8063dba45fe01461040a578063e03dab1a1461041d578063e389d9a41461048857600080fd5b80638da5cb5b116100b05780638da5cb5b146103aa578063ce7817d1146103d5578063d09dc339146103f557600080fd5b806379ba50971461035757806387d6d8431461036c57600080fd5b80633aa5ac0711610122578063638786681161010757806363878668146102dc5780636c2f1a17146103105780636d1342cb1461032357600080fd5b80633aa5ac071461026357806350538094146102bc57600080fd5b8063181f5a7711610153578063181f5a77146101df5780631d4d84a21461022b57806332f5f7461461024d57600080fd5b8063013f542b1461016f57806301ffc9a7146101af575b600080fd5b34801561017b57600080fd5b5061019c61018a36600461265b565b60036020526000908152604090205481565b6040519081526020015b60405180910390f35b3480156101bb57600080fd5b506101cf6101ca366004612674565b61051c565b60405190151581526020016101a6565b3480156101eb57600080fd5b50604080518082018252601081527f4665654d616e6167657220312e302e3000000000000000000000000000000000602082015290516101a691906126da565b34801561023757600080fd5b5061024b610246366004612783565b6105b5565b005b34801561025957600080fd5b5061019c60045481565b34801561026f57600080fd5b506102977f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a6565b3480156102c857600080fd5b5061024b6102d73660046127e6565b610749565b3480156102e857600080fd5b506102977f000000000000000000000000000000000000000000000000000000000000000081565b61024b61031e36600461284a565b6107e3565b34801561032f57600080fd5b506102977f000000000000000000000000000000000000000000000000000000000000000081565b34801561036357600080fd5b5061024b610a2a565b34801561037857600080fd5b5061019c6103873660046128f9565b600260209081526000938452604080852082529284528284209052825290205481565b3480156103b657600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610297565b3480156103e157600080fd5b5061024b6103f0366004612930565b610b2c565b34801561040157600080fd5b5061019c610ce8565b61024b610418366004612981565b610d9e565b34801561042957600080fd5b5061043d610438366004612adf565b610f3a565b60408051845173ffffffffffffffffffffffffffffffffffffffff9081168252602095860151868301528451169181019190915292909101516060830152608082015260a0016101a6565b34801561049457600080fd5b5061024b6104a336600461265b565b611339565b3480156104b457600080fd5b506102977f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e857600080fd5b5061024b6104f7366004612b38565b61150a565b34801561050857600080fd5b5061024b610517366004612b55565b61151e565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fdba45fe00000000000000000000000000000000000000000000000000000000014806105af57507fffffffff0000000000000000000000000000000000000000000000000000000082167f6c2f1a1700000000000000000000000000000000000000000000000000000000145b92915050565b6105bd611660565b73ffffffffffffffffffffffffffffffffffffffff83166106925760008273ffffffffffffffffffffffffffffffffffffffff168277ffffffffffffffffffffffffffffffffffffffffffffffff1660405160006040518083038185875af1925050503d806000811461064c576040519150601f19603f3d011682016040523d82523d6000602084013e610651565b606091505b505090508061068c576040517fef2af20100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6106cd73ffffffffffffffffffffffffffffffffffffffff84168377ffffffffffffffffffffffffffffffffffffffffffffffff84166116e3565b6040805133815273ffffffffffffffffffffffffffffffffffffffff848116602083015285168183015277ffffffffffffffffffffffffffffffffffffffffffffffff8316606082015290517f7ff78a71698bdb18dcca96f52ab25e0a1b146fb6a49adf8e6845299e49021f299181900360800190a15b505050565b610751611660565b670de0b6b3a764000067ffffffffffffffff8216111561079d576040517f05e8ac2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff811660048190556040519081527f08f7c0d17932ddb8523bc06754d42ff19ebc77d76a8b9bfde02c28ab1ed3d6399060200160405180910390a150565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610852576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008467ffffffffffffffff81111561086d5761086d612a05565b6040519080825280602002602001820160405280156108a657816020015b6108936125ce565b81526020019060019003908161088b5790505b5090506000806000805b888110156109f15760008060006108ec8d8d868181106108d2576108d2612bd4565b90506020028101906108e49190612c03565b8d8d8d6117b7565b92509250925082602001516000146109dd5760405180608001604052808e8e8781811061091b5761091b612bd4565b905060200281019061092d9190612c03565b61093691612c68565b81526020018481526020018381526020018281525088868061095790612cd3565b97508151811061096957610969612bd4565b60200260200101819052507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff16036109d6578660010196506109dd565b8560010195505b505050806109ea90612cd3565b90506108b0565b50821515806109ff57508115155b15610a1557610a10858585856118c7565b610a1f565b610a1f85346120db565b505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ab0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b34611660565b670de0b6b3a764000067ffffffffffffffff82161115610b80576040517f997ea36000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015610c2857507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15610c5f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff848116600081815260026020908152604080832088845282528083209487168084529482529182902067ffffffffffffffff86169081905582519485529084015285927f5eba5a8afa39780f0f99b6cbeb95f3da6a7040ca00abd46bdc91a0a060134139910160405180910390a350505050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610d75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d999190612d0b565b905090565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e0d576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806000610e1f88888888886117b7565b9250925092508260200151600003610e4357610e3b84346120db565b505050610f33565b604080516001808252818301909252600091816020015b610e626125ce565b815260200190600190039081610e5a575050604080516080810190915290915080610e8d8a8c612c68565b81526020018581526020018481526020018381525081600081518110610eb557610eb5612bd4565b60200260200101819052507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16846000015173ffffffffffffffffffffffffffffffffffffffff1603610f2557610a108582600160006118c7565b610a1f8582600060016118c7565b5050505050565b6040805180820182526000808252602080830182905283518085018552828152808201839052845180860186528381528083018490528551808701909652838652918501839052929382610f8d88612d24565b90507fffff00000000000000000000000000000000000000000000000000000000000080821690810161102857505073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811683527f0000000000000000000000000000000000000000000000000000000000000000168152909350915060009050611330565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16141580156110d057507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614155b15611107576040517ff861803000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008b8060200190518101906111209190612d7d565b77ffffffffffffffffffffffffffffffffffffffffffffffff91821698509116955063ffffffff1693505050428210159050611188576040517fb6c405f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808e16600090815260026020908152604080832089845282528083208f851684529091529020547f000000000000000000000000000000000000000000000000000000000000000090911687526112176111ff82670de0b6b3a7640000612def565b6112099086612e02565b670de0b6b3a7640000612128565b602088015273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116908d16036112a45773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016885260208088015190890152611321565b6004546000906112c0906111ff90670de0b6b3a7640000612e3f565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168a52905061131a61131083670de0b6b3a7640000612def565b6112099083612e02565b60208a0152505b96995094975094955050505050505b93509350939050565b611341611660565b6000818152600360205260408120549081900361138a576040517f03aad31200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600360205260408082208290558051600180825281830190925290816020015b60408051808201909152600080825260208201528152602001906001900390816113af57905050905060405180604001604052808481526020018377ffffffffffffffffffffffffffffffffffffffffffffffff168152508160008151811061141a5761141a612bd4565b60209081029190910101526040517fb0d9fa1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063b0d9fa19906114999084903090600401612eb2565b600060405180830381600087803b1580156114b357600080fd5b505af11580156114c7573d6000803e3d6000fd5b50505050827f843f0b103e50b42b08f9d30f12f961845a6d02623730872e24644899c0dd9895836040516114fd91815260200190565b60405180910390a2505050565b611512611660565b61151b81612160565b50565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480159061157c575060005473ffffffffffffffffffffffffffffffffffffffff163314155b156115b3576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f14060f2300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906314060f239061162990869086908690600401612eea565b600060405180830381600087803b15801561164357600080fd5b505af1158015611657573d6000803e3d6000fd5b50505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146116e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610aa7565b565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526107449084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612255565b6040805180820190915260008082526020820152604080518082019091526000808252602082015260003073ffffffffffffffffffffffffffffffffffffffff851603611830576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061183e888a018a612f6a565b91505060008161184d90612d24565b905060007e010000000000000000000000000000000000000000000000000000000000007fffff0000000000000000000000000000000000000000000000000000000000008316146118a8576118a5888a018a612b38565b90505b6118b3878483610f3a565b955095509550505050955095509592505050565b60008267ffffffffffffffff8111156118e2576118e2612a05565b60405190808252806020026020018201604052801561192757816020015b60408051808201909152600080825260208201528152602001906001900390816119005790505b50905060008267ffffffffffffffff81111561194557611945612a05565b60405190808252806020026020018201604052801561198a57816020015b60408051808201909152600080825260208201528152602001906001900390816119635790505b50905060008080808061199d888a612e3f565b905060005b81811015611cec577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168b82815181106119f3576119f3612bd4565b6020026020010151602001516000015173ffffffffffffffffffffffffffffffffffffffff1603611ab95760405180604001604052808c8381518110611a3b57611a3b612bd4565b60200260200101516000015181526020018c8381518110611a5e57611a5e612bd4565b6020026020010151604001516020015177ffffffffffffffffffffffffffffffffffffffffffffffff16815250888580611a9790612cd3565b965081518110611aa957611aa9612bd4565b6020026020010181905250611bae565b60405180604001604052808c8381518110611ad657611ad6612bd4565b60200260200101516000015181526020018c8381518110611af957611af9612bd4565b6020026020010151604001516020015177ffffffffffffffffffffffffffffffffffffffffffffffff16815250878480611b3290612cd3565b955081518110611b4457611b44612bd4565b60200260200101819052508a8181518110611b6157611b61612bd4565b6020026020010151602001516020015186611b7c9190612e3f565b95508a8181518110611b9057611b90612bd4565b6020026020010151604001516020015185611bab9190612e3f565b94505b8a8181518110611bc057611bc0612bd4565b602002602001015160600151600014611cdc578b73ffffffffffffffffffffffffffffffffffffffff168b8281518110611bfc57611bfc612bd4565b6020026020010151600001517f88b15eb682210089cddf967648e2cb2a4535aeadc8f8f36050922e33c04e71258d8481518110611c3b57611c3b612bd4565b6020026020010151602001518e8581518110611c5957611c59612bd4565b6020026020010151604001518f8681518110611c7757611c77612bd4565b602002602001015160600151604051611cd393929190835173ffffffffffffffffffffffffffffffffffffffff908116825260209485015185830152835116604082015291909201516060820152608081019190915260a00190565b60405180910390a35b611ce581612cd3565b90506119a2565b5060003415611dba5734861115611d2f576040517fb2e532de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0876040518263ffffffff1660e01b81526004016000604051808303818588803b158015611d9757600080fd5b505af1158015611dab573d6000803e3d6000fd5b50505050508534039050611e02565b8515611e0257611e0273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168d3089612361565b875115611e97577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b0d9fa19898e6040518363ffffffff1660e01b8152600401611e64929190612eb2565b600060405180830381600087803b158015611e7e57600080fd5b505af1158015611e92573d6000803e3d6000fd5b505050505b8651156120c3576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611f28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f4c9190612d0b565b85111561201c5760005b8751811015611fdf57878181518110611f7157611f71612bd4565b60200260200101516020015177ffffffffffffffffffffffffffffffffffffffffffffffff16600360008a8481518110611fad57611fad612bd4565b60209081029190910181015151825281019190915260400160002080549091019055611fd881612cd3565b9050611f56565b507ff52e5907b69d97c33392936c12d78b494463b78c5b72df50b4c497eee5720b678760405161200f919061300e565b60405180910390a16120c3565b6040517fb0d9fa1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063b0d9fa1990612090908a903090600401612eb2565b600060405180830381600087803b1580156120aa57600080fd5b505af11580156120be573d6000803e3d6000fd5b505050505b6120cd8c826120db565b505050505050505050505050565b80156121245760405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610744573d6000803e3d6000fd5b5050565b60008215612156578161213c600185612def565b6121469190613021565b612151906001612e3f565b612159565b60005b9392505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036121df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610aa7565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006122b7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166123bf9092919063ffffffff16565b80519091501561074457808060200190518101906122d5919061305c565b610744576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610aa7565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261068c9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611735565b60606123ce84846000856123d6565b949350505050565b606082471015612468576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610aa7565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612491919061307e565b60006040518083038185875af1925050503d80600081146124ce576040519150601f19603f3d011682016040523d82523d6000602084013e6124d3565b606091505b50915091506124e4878383876124ef565b979650505050505050565b6060831561258557825160000361257e5773ffffffffffffffffffffffffffffffffffffffff85163b61257e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610aa7565b50816123ce565b6123ce838381511561259a5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa791906126da565b6040518060800160405280600080191681526020016126166040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b815260200161264e6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b8152602001600081525090565b60006020828403121561266d57600080fd5b5035919050565b60006020828403121561268657600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461215957600080fd5b60005b838110156126d15781810151838201526020016126b9565b50506000910152565b60208152600082518060208401526126f98160408501602087016126b6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b73ffffffffffffffffffffffffffffffffffffffff8116811461151b57600080fd5b80356127588161272b565b919050565b77ffffffffffffffffffffffffffffffffffffffffffffffff8116811461151b57600080fd5b60008060006060848603121561279857600080fd5b83356127a38161272b565b925060208401356127b38161272b565b915060408401356127c38161275d565b809150509250925092565b803567ffffffffffffffff8116811461275857600080fd5b6000602082840312156127f857600080fd5b612159826127ce565b60008083601f84011261281357600080fd5b50813567ffffffffffffffff81111561282b57600080fd5b60208301915083602082850101111561284357600080fd5b9250929050565b60008060008060006060868803121561286257600080fd5b853567ffffffffffffffff8082111561287a57600080fd5b818801915088601f83011261288e57600080fd5b81358181111561289d57600080fd5b8960208260051b85010111156128b257600080fd5b6020928301975095509087013590808211156128cd57600080fd5b506128da88828901612801565b90945092506128ed90506040870161274d565b90509295509295909350565b60008060006060848603121561290e57600080fd5b83356129198161272b565b92506020840135915060408401356127c38161272b565b6000806000806080858703121561294657600080fd5b84356129518161272b565b93506020850135925060408501356129688161272b565b9150612976606086016127ce565b905092959194509250565b60008060008060006060868803121561299957600080fd5b853567ffffffffffffffff808211156129b157600080fd5b6129bd89838a01612801565b909750955060208801359150808211156129d657600080fd5b506129e388828901612801565b90945092505060408601356129f78161272b565b809150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112612a4557600080fd5b813567ffffffffffffffff80821115612a6057612a60612a05565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715612aa657612aa6612a05565b81604052838152866020858801011115612abf57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215612af457600080fd5b8335612aff8161272b565b9250602084013567ffffffffffffffff811115612b1b57600080fd5b612b2786828701612a34565b92505060408401356127c38161272b565b600060208284031215612b4a57600080fd5b81356121598161272b565b600080600060408486031215612b6a57600080fd5b83359250602084013567ffffffffffffffff80821115612b8957600080fd5b818601915086601f830112612b9d57600080fd5b813581811115612bac57600080fd5b8760208260061b8501011115612bc157600080fd5b6020830194508093505050509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612c3857600080fd5b83018035915067ffffffffffffffff821115612c5357600080fd5b60200191503681900382131561284357600080fd5b803560208310156105af577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d0457612d04612ca4565b5060010190565b600060208284031215612d1d57600080fd5b5051919050565b80516020808301519190811015612d63577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160200360031b1b821691505b50919050565b805163ffffffff8116811461275857600080fd5b60008060008060008060c08789031215612d9657600080fd5b86519550612da660208801612d69565b9450612db460408801612d69565b93506060870151612dc48161275d565b6080880151909350612dd58161275d565b9150612de360a08801612d69565b90509295509295509295565b818103818111156105af576105af612ca4565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612e3a57612e3a612ca4565b500290565b808201808211156105af576105af612ca4565b600081518084526020808501945080840160005b83811015612ea75781518051885283015177ffffffffffffffffffffffffffffffffffffffffffffffff168388015260409096019590820190600101612e66565b509495945050505050565b604081526000612ec56040830185612e52565b905073ffffffffffffffffffffffffffffffffffffffff831660208301529392505050565b8381526040602080830182905282820184905260009190859060608501845b87811015612f5d578335612f1c8161272b565b73ffffffffffffffffffffffffffffffffffffffff16825267ffffffffffffffff612f488585016127ce565b16828401529284019290840190600101612f09565b5098975050505050505050565b60008060808385031215612f7d57600080fd5b83601f840112612f8c57600080fd5b6040516060810167ffffffffffffffff8282108183111715612fb057612fb0612a05565b816040528291506060860187811115612fc857600080fd5b865b81811015612fe2578035845260209384019301612fca565b5092945091359180831115612ff657600080fd5b505061300485828601612a34565b9150509250929050565b6020815260006121596020830184612e52565b600082613057577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561306e57600080fd5b8151801515811461215957600080fd5b600082516130908184602087016126b6565b919091019291505056fea164736f6c6343000810000a",
}
var FeeManagerABI = FeeManagerMetaData.ABI
@@ -190,9 +186,9 @@ func (_FeeManager *FeeManagerTransactorRaw) Transact(opts *bind.TransactOpts, me
return _FeeManager.Contract.contract.Transact(opts, method, params...)
}
-func (_FeeManager *FeeManagerCaller) GetFeeAndReward(opts *bind.CallOpts, subscriber common.Address, report []byte, quote IFeeManagerQuote) (CommonAsset, CommonAsset, *big.Int, error) {
+func (_FeeManager *FeeManagerCaller) GetFeeAndReward(opts *bind.CallOpts, subscriber common.Address, report []byte, quoteAddress common.Address) (CommonAsset, CommonAsset, *big.Int, error) {
var out []interface{}
- err := _FeeManager.contract.Call(opts, &out, "getFeeAndReward", subscriber, report, quote)
+ err := _FeeManager.contract.Call(opts, &out, "getFeeAndReward", subscriber, report, quoteAddress)
if err != nil {
return *new(CommonAsset), *new(CommonAsset), *new(*big.Int), err
@@ -206,12 +202,12 @@ func (_FeeManager *FeeManagerCaller) GetFeeAndReward(opts *bind.CallOpts, subscr
}
-func (_FeeManager *FeeManagerSession) GetFeeAndReward(subscriber common.Address, report []byte, quote IFeeManagerQuote) (CommonAsset, CommonAsset, *big.Int, error) {
- return _FeeManager.Contract.GetFeeAndReward(&_FeeManager.CallOpts, subscriber, report, quote)
+func (_FeeManager *FeeManagerSession) GetFeeAndReward(subscriber common.Address, report []byte, quoteAddress common.Address) (CommonAsset, CommonAsset, *big.Int, error) {
+ return _FeeManager.Contract.GetFeeAndReward(&_FeeManager.CallOpts, subscriber, report, quoteAddress)
}
-func (_FeeManager *FeeManagerCallerSession) GetFeeAndReward(subscriber common.Address, report []byte, quote IFeeManagerQuote) (CommonAsset, CommonAsset, *big.Int, error) {
- return _FeeManager.Contract.GetFeeAndReward(&_FeeManager.CallOpts, subscriber, report, quote)
+func (_FeeManager *FeeManagerCallerSession) GetFeeAndReward(subscriber common.Address, report []byte, quoteAddress common.Address) (CommonAsset, CommonAsset, *big.Int, error) {
+ return _FeeManager.Contract.GetFeeAndReward(&_FeeManager.CallOpts, subscriber, report, quoteAddress)
}
func (_FeeManager *FeeManagerCaller) ILinkAddress(opts *bind.CallOpts) (common.Address, error) {
@@ -480,28 +476,28 @@ func (_FeeManager *FeeManagerTransactorSession) PayLinkDeficit(configDigest [32]
return _FeeManager.Contract.PayLinkDeficit(&_FeeManager.TransactOpts, configDigest)
}
-func (_FeeManager *FeeManagerTransactor) ProcessFee(opts *bind.TransactOpts, payload []byte, subscriber common.Address) (*types.Transaction, error) {
- return _FeeManager.contract.Transact(opts, "processFee", payload, subscriber)
+func (_FeeManager *FeeManagerTransactor) ProcessFee(opts *bind.TransactOpts, payload []byte, parameterPayload []byte, subscriber common.Address) (*types.Transaction, error) {
+ return _FeeManager.contract.Transact(opts, "processFee", payload, parameterPayload, subscriber)
}
-func (_FeeManager *FeeManagerSession) ProcessFee(payload []byte, subscriber common.Address) (*types.Transaction, error) {
- return _FeeManager.Contract.ProcessFee(&_FeeManager.TransactOpts, payload, subscriber)
+func (_FeeManager *FeeManagerSession) ProcessFee(payload []byte, parameterPayload []byte, subscriber common.Address) (*types.Transaction, error) {
+ return _FeeManager.Contract.ProcessFee(&_FeeManager.TransactOpts, payload, parameterPayload, subscriber)
}
-func (_FeeManager *FeeManagerTransactorSession) ProcessFee(payload []byte, subscriber common.Address) (*types.Transaction, error) {
- return _FeeManager.Contract.ProcessFee(&_FeeManager.TransactOpts, payload, subscriber)
+func (_FeeManager *FeeManagerTransactorSession) ProcessFee(payload []byte, parameterPayload []byte, subscriber common.Address) (*types.Transaction, error) {
+ return _FeeManager.Contract.ProcessFee(&_FeeManager.TransactOpts, payload, parameterPayload, subscriber)
}
-func (_FeeManager *FeeManagerTransactor) ProcessFeeBulk(opts *bind.TransactOpts, payloads [][]byte, subscriber common.Address) (*types.Transaction, error) {
- return _FeeManager.contract.Transact(opts, "processFeeBulk", payloads, subscriber)
+func (_FeeManager *FeeManagerTransactor) ProcessFeeBulk(opts *bind.TransactOpts, payloads [][]byte, parameterPayload []byte, subscriber common.Address) (*types.Transaction, error) {
+ return _FeeManager.contract.Transact(opts, "processFeeBulk", payloads, parameterPayload, subscriber)
}
-func (_FeeManager *FeeManagerSession) ProcessFeeBulk(payloads [][]byte, subscriber common.Address) (*types.Transaction, error) {
- return _FeeManager.Contract.ProcessFeeBulk(&_FeeManager.TransactOpts, payloads, subscriber)
+func (_FeeManager *FeeManagerSession) ProcessFeeBulk(payloads [][]byte, parameterPayload []byte, subscriber common.Address) (*types.Transaction, error) {
+ return _FeeManager.Contract.ProcessFeeBulk(&_FeeManager.TransactOpts, payloads, parameterPayload, subscriber)
}
-func (_FeeManager *FeeManagerTransactorSession) ProcessFeeBulk(payloads [][]byte, subscriber common.Address) (*types.Transaction, error) {
- return _FeeManager.Contract.ProcessFeeBulk(&_FeeManager.TransactOpts, payloads, subscriber)
+func (_FeeManager *FeeManagerTransactorSession) ProcessFeeBulk(payloads [][]byte, parameterPayload []byte, subscriber common.Address) (*types.Transaction, error) {
+ return _FeeManager.Contract.ProcessFeeBulk(&_FeeManager.TransactOpts, payloads, parameterPayload, subscriber)
}
func (_FeeManager *FeeManagerTransactor) SetFeeRecipients(opts *bind.TransactOpts, configDigest [32]byte, rewardRecipientAndWeights []CommonAddressAndWeight) (*types.Transaction, error) {
@@ -1656,7 +1652,7 @@ func (_FeeManager *FeeManager) Address() common.Address {
}
type FeeManagerInterface interface {
- GetFeeAndReward(opts *bind.CallOpts, subscriber common.Address, report []byte, quote IFeeManagerQuote) (CommonAsset, CommonAsset, *big.Int, error)
+ GetFeeAndReward(opts *bind.CallOpts, subscriber common.Address, report []byte, quoteAddress common.Address) (CommonAsset, CommonAsset, *big.Int, error)
ILinkAddress(opts *bind.CallOpts) (common.Address, error)
@@ -1684,9 +1680,9 @@ type FeeManagerInterface interface {
PayLinkDeficit(opts *bind.TransactOpts, configDigest [32]byte) (*types.Transaction, error)
- ProcessFee(opts *bind.TransactOpts, payload []byte, subscriber common.Address) (*types.Transaction, error)
+ ProcessFee(opts *bind.TransactOpts, payload []byte, parameterPayload []byte, subscriber common.Address) (*types.Transaction, error)
- ProcessFeeBulk(opts *bind.TransactOpts, payloads [][]byte, subscriber common.Address) (*types.Transaction, error)
+ ProcessFeeBulk(opts *bind.TransactOpts, payloads [][]byte, parameterPayload []byte, subscriber common.Address) (*types.Transaction, error)
SetFeeRecipients(opts *bind.TransactOpts, configDigest [32]byte, rewardRecipientAndWeights []CommonAddressAndWeight) (*types.Transaction, error)
diff --git a/core/gethwrappers/llo-feeds/generated/verifier_proxy/verifier_proxy.go b/core/gethwrappers/llo-feeds/generated/verifier_proxy/verifier_proxy.go
index 12e5e28948..30bb00e6a4 100644
--- a/core/gethwrappers/llo-feeds/generated/verifier_proxy/verifier_proxy.go
+++ b/core/gethwrappers/llo-feeds/generated/verifier_proxy/verifier_proxy.go
@@ -36,8 +36,8 @@ type CommonAddressAndWeight struct {
}
var VerifierProxyMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"accessController\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BadVerification\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"ConfigDigestAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FeeManagerInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"VerifierAlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VerifierInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"VerifierNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessController\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessController\",\"type\":\"address\"}],\"name\":\"AccessControllerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldFeeManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newFeeManager\",\"type\":\"address\"}],\"name\":\"FeeManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"oldConfigDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"newConfigDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierUnset\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"initializeVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_accessController\",\"outputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_feeManager\",\"outputs\":[{\"internalType\":\"contractIVerifierFeeManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"accessController\",\"type\":\"address\"}],\"name\":\"setAccessController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIVerifierFeeManager\",\"name\":\"feeManager\",\"type\":\"address\"}],\"name\":\"setFeeManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"currentConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newConfigDigest\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structCommon.AddressAndWeight[]\",\"name\":\"addressesAndWeights\",\"type\":\"tuple[]\"}],\"name\":\"setVerifier\",\"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\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"unsetVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"payloads\",\"type\":\"bytes[]\"}],\"name\":\"verifyBulk\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"verifiedReports\",\"type\":\"bytes[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
- Bin: "0x60806040523480156200001157600080fd5b5060405162001c6138038062001c61833981016040819052620000349162000193565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000e8565b5050600480546001600160a01b0319166001600160a01b03939093169290921790915550620001c5565b336001600160a01b03821603620001425760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001a657600080fd5b81516001600160a01b0381168114620001be57600080fd5b9392505050565b611a8c80620001d56000396000f3fe6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063b011b24711610059578063b011b2471461028e578063eeb7b248146102ae578063f08391d8146102f1578063f2fde38b1461031157600080fd5b80638da5cb5b146102235780638e760afe1461024e57806394ba28461461026157600080fd5b80636e914094116100bb5780636e914094146101ae57806379ba5097146101ce57806383490cd7146101e35780638c2a4d531461020357600080fd5b8063181f5a77146100e257806338416b5b1461013a578063472d35b91461018c575b600080fd5b3480156100ee57600080fd5b5060408051808201909152601381527f566572696669657250726f787920312e312e300000000000000000000000000060208201525b60405161013191906113b2565b60405180910390f35b34801561014657600080fd5b506005546101679073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610131565b34801561019857600080fd5b506101ac6101a73660046113ee565b610331565b005b3480156101ba57600080fd5b506101ac6101c936600461140b565b6105a9565b3480156101da57600080fd5b506101ac61069a565b6101f66101f1366004611424565b610797565b6040516101319190611499565b34801561020f57600080fd5b506101ac61021e3660046113ee565b6109f5565b34801561022f57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610167565b61012461025c366004611519565b610c26565b34801561026d57600080fd5b506004546101679073ffffffffffffffffffffffffffffffffffffffff1681565b34801561029a57600080fd5b506101ac6102a9366004611579565b610dda565b3480156102ba57600080fd5b506101676102c936600461140b565b60009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b3480156102fd57600080fd5b506101ac61030c3660046113ee565b611000565b34801561031d57600080fd5b506101ac61032c3660046113ee565b611087565b61033961109b565b73ffffffffffffffffffffffffffffffffffffffff8116610386576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff1387e1600000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610410573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043491906115fc565b15806104eb57506040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f40d7f78e00000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa1580156104c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e991906115fc565b155b15610522576040517f8238941900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f04628abcaa6b1674651352125cb94b65b289145bc2bc4d67720bb7d966372f0391015b60405180910390a15050565b6105b161109b565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610615576040517fb151802b000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b6000828152600360205260409081902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055517f11dc15c4b8ac2b183166cc8427e5385a5ece8308217a4217338c6a7614845c4c9061059d908490849091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60015473ffffffffffffffffffffffffffffffffffffffff16331461071b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161060c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60045460609073ffffffffffffffffffffffffffffffffffffffff16801580159061085757506040517f6b14daf800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690636b14daf8906108149033906000903690600401611667565b602060405180830381865afa158015610831573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085591906115fc565b155b1561088e576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055473ffffffffffffffffffffffffffffffffffffffff168015610938576040517f40d7f78e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216906340d7f78e90349061090590899089903390600401611697565b6000604051808303818588803b15801561091e57600080fd5b505af1158015610932573d6000803e3d6000fd5b50505050505b8367ffffffffffffffff8111156109515761095161178c565b60405190808252806020026020018201604052801561098457816020015b606081526020019060019003908161096f5790505b50925060005b848110156109ec576109be8686838181106109a7576109a76117bb565b90506020028101906109b991906117ea565b61111e565b8482815181106109d0576109d06117bb565b6020026020010181905250806109e590611856565b905061098a565b50505092915050565b6109fd61109b565b8073ffffffffffffffffffffffffffffffffffffffff8116610a4b576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f3d3ac1b500000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610ad5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af991906115fc565b610b2f576040517f75b0527a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205460ff1615610ba7576040517f4e01ccfd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240161060c565b73ffffffffffffffffffffffffffffffffffffffff821660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905590519182527f1f2cd7c97f4d801b5efe26cc409617c1fd6c5ef786e79aacb90af40923e4e8e9910161059d565b60045460609073ffffffffffffffffffffffffffffffffffffffff168015801590610ce657506040517f6b14daf800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690636b14daf890610ca39033906000903690600401611667565b602060405180830381865afa158015610cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce491906115fc565b155b15610d1d576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055473ffffffffffffffffffffffffffffffffffffffff168015610dc7576040517ff1387e1600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063f1387e16903490610d94908990899033906004016118b5565b6000604051808303818588803b158015610dad57600080fd5b505af1158015610dc1573d6000803e3d6000fd5b50505050505b610dd1858561111e565b95945050505050565b600083815260036020526040902054839073ffffffffffffffffffffffffffffffffffffffff168015610e58576040517f375d1fe60000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216602482015260440161060c565b3360009081526002602052604090205460ff16610ea1576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600085815260036020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790558215610fb95760055473ffffffffffffffffffffffffffffffffffffffff16610f2c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546040517ff65df96200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063f65df96290610f86908890889088906004016118ef565b600060405180830381600087803b158015610fa057600080fd5b505af1158015610fb4573d6000803e3d6000fd5b505050505b6040805187815260208101879052338183015290517fbeb513e532542a562ac35699e7cd9ae7d198dcd3eee15bada6c857d28ceaddcf9181900360600190a1505050505050565b61100861109b565b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f953e92b1a6442e9c3242531154a3f6f6eb00b4e9c719ba8118fa6235e4ce89b6910161059d565b61108f61109b565b6110988161124f565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461111c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161060c565b565b6060600061112c8385611978565b60008181526003602052604090205490915073ffffffffffffffffffffffffffffffffffffffff168061118e576040517fb151802b0000000000000000000000000000000000000000000000000000000081526004810183905260240161060c565b6040517f3d3ac1b500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690633d3ac1b5906111e4908890889033906004016118b5565b6000604051808303816000875af1158015611203573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610dd191908101906119b4565b92915050565b3373ffffffffffffffffffffffffffffffffffffffff8216036112ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161060c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60005b8381101561135f578181015183820152602001611347565b50506000910152565b60008151808452611380816020860160208601611344565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006113c56020830184611368565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461109857600080fd5b60006020828403121561140057600080fd5b81356113c5816113cc565b60006020828403121561141d57600080fd5b5035919050565b6000806020838503121561143757600080fd5b823567ffffffffffffffff8082111561144f57600080fd5b818501915085601f83011261146357600080fd5b81358181111561147257600080fd5b8660208260051b850101111561148757600080fd5b60209290920196919550909350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561150c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526114fa858351611368565b945092850192908501906001016114c0565b5092979650505050505050565b6000806020838503121561152c57600080fd5b823567ffffffffffffffff8082111561154457600080fd5b818501915085601f83011261155857600080fd5b81358181111561156757600080fd5b86602082850101111561148757600080fd5b6000806000806060858703121561158f57600080fd5b8435935060208501359250604085013567ffffffffffffffff808211156115b557600080fd5b818701915087601f8301126115c957600080fd5b8135818111156115d857600080fd5b8860208260061b85010111156115ed57600080fd5b95989497505060200194505050565b60006020828403121561160e57600080fd5b815180151581146113c557600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff84168152604060208201526000610dd160408301848661161e565b6040808252810183905260006060600585901b8301810190830186835b87811015611763577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa086850301835281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18a360301811261171557600080fd5b8901602081810191359067ffffffffffffffff82111561173457600080fd5b81360383131561174357600080fd5b61174e87838561161e565b965094850194939093019250506001016116b4565b50505073ffffffffffffffffffffffffffffffffffffffff841660208401529050949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261181f57600080fd5b83018035915067ffffffffffffffff82111561183a57600080fd5b60200191503681900382131561184f57600080fd5b9250929050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036118ae577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b6040815260006118c960408301858761161e565b905073ffffffffffffffffffffffffffffffffffffffff83166020830152949350505050565b838152604060208083018290528282018490526000919085906060850184805b88811015611969578435611922816113cc565b73ffffffffffffffffffffffffffffffffffffffff1683528484013567ffffffffffffffff8116808214611954578384fd5b8486015250938501939185019160010161190f565b50909998505050505050505050565b80356020831015611249577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b6000602082840312156119c657600080fd5b815167ffffffffffffffff808211156119de57600080fd5b818401915084601f8301126119f257600080fd5b815181811115611a0457611a0461178c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611a4a57611a4a61178c565b81604052828152876020848701011115611a6357600080fd5b611a74836020830160208801611344565b97965050505050505056fea164736f6c6343000810000a",
+ ABI: "[{\"inputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"accessController\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BadVerification\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"ConfigDigestAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FeeManagerInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"VerifierAlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VerifierInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"VerifierNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessController\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessController\",\"type\":\"address\"}],\"name\":\"AccessControllerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldFeeManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newFeeManager\",\"type\":\"address\"}],\"name\":\"FeeManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"oldConfigDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"newConfigDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierUnset\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"initializeVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_accessController\",\"outputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_feeManager\",\"outputs\":[{\"internalType\":\"contractIVerifierFeeManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"accessController\",\"type\":\"address\"}],\"name\":\"setAccessController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIVerifierFeeManager\",\"name\":\"feeManager\",\"type\":\"address\"}],\"name\":\"setFeeManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"currentConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newConfigDigest\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structCommon.AddressAndWeight[]\",\"name\":\"addressesAndWeights\",\"type\":\"tuple[]\"}],\"name\":\"setVerifier\",\"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\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"unsetVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"parameterPayload\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"payloads\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"parameterPayload\",\"type\":\"bytes\"}],\"name\":\"verifyBulk\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"verifiedReports\",\"type\":\"bytes[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
+ Bin: "0x60806040523480156200001157600080fd5b5060405162001d3638038062001d36833981016040819052620000349162000193565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000e8565b5050600480546001600160a01b0319166001600160a01b03939093169290921790915550620001c5565b336001600160a01b03821603620001425760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001a657600080fd5b81516001600160a01b0381168114620001be57600080fd5b9392505050565b611b6180620001d56000396000f3fe6080604052600436106100dd5760003560e01c806394ba28461161007f578063f08391d811610059578063f08391d8146102be578063f2fde38b146102de578063f7e83aee146102fe578063f873a61c1461031157600080fd5b806394ba28461461022e578063b011b2471461025b578063eeb7b2481461027b57600080fd5b80636e914094116100bb5780636e914094146101ae57806379ba5097146101ce5780638c2a4d53146101e35780638da5cb5b1461020357600080fd5b8063181f5a77146100e257806338416b5b1461013a578063472d35b91461018c575b600080fd5b3480156100ee57600080fd5b5060408051808201909152601381527f566572696669657250726f787920312e312e300000000000000000000000000060208201525b60405161013191906113c3565b60405180910390f35b34801561014657600080fd5b506005546101679073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610131565b34801561019857600080fd5b506101ac6101a73660046113ff565b610331565b005b3480156101ba57600080fd5b506101ac6101c936600461141c565b6105a9565b3480156101da57600080fd5b506101ac61069a565b3480156101ef57600080fd5b506101ac6101fe3660046113ff565b610797565b34801561020f57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610167565b34801561023a57600080fd5b506004546101679073ffffffffffffffffffffffffffffffffffffffff1681565b34801561026757600080fd5b506101ac610276366004611435565b6109c8565b34801561028757600080fd5b5061016761029636600461141c565b60009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b3480156102ca57600080fd5b506101ac6102d93660046113ff565b610bee565b3480156102ea57600080fd5b506101ac6102f93660046113ff565b610c75565b61012461030c366004611501565b610c89565b61032461031f36600461156d565b610e43565b60405161013191906115ee565b6103396110a7565b73ffffffffffffffffffffffffffffffffffffffff8116610386576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fdba45fe000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610410573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610434919061166e565b15806104eb57506040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f6c2f1a1700000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa1580156104c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e9919061166e565b155b15610522576040517f8238941900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f04628abcaa6b1674651352125cb94b65b289145bc2bc4d67720bb7d966372f0391015b60405180910390a15050565b6105b16110a7565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610615576040517fb151802b000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b6000828152600360205260409081902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055517f11dc15c4b8ac2b183166cc8427e5385a5ece8308217a4217338c6a7614845c4c9061059d908490849091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60015473ffffffffffffffffffffffffffffffffffffffff16331461071b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161060c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61079f6110a7565b8073ffffffffffffffffffffffffffffffffffffffff81166107ed576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f3d3ac1b500000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b919061166e565b6108d1576040517f75b0527a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205460ff1615610949576040517f4e01ccfd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240161060c565b73ffffffffffffffffffffffffffffffffffffffff821660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905590519182527f1f2cd7c97f4d801b5efe26cc409617c1fd6c5ef786e79aacb90af40923e4e8e9910161059d565b600083815260036020526040902054839073ffffffffffffffffffffffffffffffffffffffff168015610a46576040517f375d1fe60000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216602482015260440161060c565b3360009081526002602052604090205460ff16610a8f576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600085815260036020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790558215610ba75760055473ffffffffffffffffffffffffffffffffffffffff16610b1a576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546040517ff65df96200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063f65df96290610b7490889088908890600401611690565b600060405180830381600087803b158015610b8e57600080fd5b505af1158015610ba2573d6000803e3d6000fd5b505050505b6040805187815260208101879052338183015290517fbeb513e532542a562ac35699e7cd9ae7d198dcd3eee15bada6c857d28ceaddcf9181900360600190a1505050505050565b610bf66110a7565b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f953e92b1a6442e9c3242531154a3f6f6eb00b4e9c719ba8118fa6235e4ce89b6910161059d565b610c7d6110a7565b610c868161112a565b50565b60045460609073ffffffffffffffffffffffffffffffffffffffff168015801590610d4957506040517f6b14daf800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690636b14daf890610d069033906000903690600401611762565b602060405180830381865afa158015610d23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d47919061166e565b155b15610d80576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055473ffffffffffffffffffffffffffffffffffffffff168015610e2e576040517fdba45fe000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063dba45fe0903490610dfb908b908b908b908b90339060040161179b565b6000604051808303818588803b158015610e1457600080fd5b505af1158015610e28573d6000803e3d6000fd5b50505050505b610e38878761121f565b979650505050505050565b60045460609073ffffffffffffffffffffffffffffffffffffffff168015801590610f0357506040517f6b14daf800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690636b14daf890610ec09033906000903690600401611762565b602060405180830381865afa158015610edd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f01919061166e565b155b15610f3a576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055473ffffffffffffffffffffffffffffffffffffffff168015610fe8576040517f6c2f1a1700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690636c2f1a17903490610fb5908b908b908b908b9033906004016117eb565b6000604051808303818588803b158015610fce57600080fd5b505af1158015610fe2573d6000803e3d6000fd5b50505050505b8567ffffffffffffffff811115611001576110016118fc565b60405190808252806020026020018201604052801561103457816020015b606081526020019060019003908161101f5790505b50925060005b8681101561109c5761106e8888838181106110575761105761192b565b9050602002810190611069919061195a565b61121f565b8482815181106110805761108061192b565b602002602001018190525080611095906119bf565b905061103a565b505050949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611128576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161060c565b565b3373ffffffffffffffffffffffffffffffffffffffff8216036111a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161060c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6060600061122d8385611a1e565b60008181526003602052604090205490915073ffffffffffffffffffffffffffffffffffffffff168061128f576040517fb151802b0000000000000000000000000000000000000000000000000000000081526004810183905260240161060c565b6040517f3d3ac1b500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690633d3ac1b5906112e590889088903390600401611a5a565b6000604051808303816000875af1158015611304573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261134a9190810190611a94565b925050505b92915050565b60005b83811015611370578181015183820152602001611358565b50506000910152565b60008151808452611391816020860160208601611355565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006113d66020830184611379565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c8657600080fd5b60006020828403121561141157600080fd5b81356113d6816113dd565b60006020828403121561142e57600080fd5b5035919050565b6000806000806060858703121561144b57600080fd5b8435935060208501359250604085013567ffffffffffffffff8082111561147157600080fd5b818701915087601f83011261148557600080fd5b81358181111561149457600080fd5b8860208260061b85010111156114a957600080fd5b95989497505060200194505050565b60008083601f8401126114ca57600080fd5b50813567ffffffffffffffff8111156114e257600080fd5b6020830191508360208285010111156114fa57600080fd5b9250929050565b6000806000806040858703121561151757600080fd5b843567ffffffffffffffff8082111561152f57600080fd5b61153b888389016114b8565b9096509450602087013591508082111561155457600080fd5b50611561878288016114b8565b95989497509550505050565b6000806000806040858703121561158357600080fd5b843567ffffffffffffffff8082111561159b57600080fd5b818701915087601f8301126115af57600080fd5b8135818111156115be57600080fd5b8860208260051b85010111156115d357600080fd5b60209283019650945090860135908082111561155457600080fd5b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611661577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261164f858351611379565b94509285019290850190600101611615565b5092979650505050505050565b60006020828403121561168057600080fd5b815180151581146113d657600080fd5b838152604060208083018290528282018490526000919085906060850184805b8881101561170a5784356116c3816113dd565b73ffffffffffffffffffffffffffffffffffffffff1683528484013567ffffffffffffffff81168082146116f5578384fd5b848601525093850193918501916001016116b0565b50909998505050505050505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff84168152604060208201526000611792604083018486611719565b95945050505050565b6060815260006117af606083018789611719565b82810360208401526117c2818688611719565b91505073ffffffffffffffffffffffffffffffffffffffff831660408301529695505050505050565b6060808252810185905260006080600587901b8301810190830188835b898110156118b7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8086850301835281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18c360301811261186957600080fd5b8b01602081810191359067ffffffffffffffff82111561188857600080fd5b81360383131561189757600080fd5b6118a2878385611719565b96509485019493909301925050600101611808565b50505082810360208401526118cd818688611719565b9150506118f2604083018473ffffffffffffffffffffffffffffffffffffffff169052565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261198f57600080fd5b83018035915067ffffffffffffffff8211156119aa57600080fd5b6020019150368190038213156114fa57600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611a17577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b8035602083101561134f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b604081526000611a6e604083018587611719565b905073ffffffffffffffffffffffffffffffffffffffff83166020830152949350505050565b600060208284031215611aa657600080fd5b815167ffffffffffffffff80821115611abe57600080fd5b818401915084601f830112611ad257600080fd5b815181811115611ae457611ae46118fc565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611b2a57611b2a6118fc565b81604052828152876020848701011115611b4357600080fd5b610e3883602083016020880161135556fea164736f6c6343000810000a",
}
var VerifierProxyABI = VerifierProxyMetaData.ABI
@@ -370,28 +370,28 @@ func (_VerifierProxy *VerifierProxyTransactorSession) UnsetVerifier(configDigest
return _VerifierProxy.Contract.UnsetVerifier(&_VerifierProxy.TransactOpts, configDigest)
}
-func (_VerifierProxy *VerifierProxyTransactor) Verify(opts *bind.TransactOpts, payload []byte) (*types.Transaction, error) {
- return _VerifierProxy.contract.Transact(opts, "verify", payload)
+func (_VerifierProxy *VerifierProxyTransactor) Verify(opts *bind.TransactOpts, payload []byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _VerifierProxy.contract.Transact(opts, "verify", payload, parameterPayload)
}
-func (_VerifierProxy *VerifierProxySession) Verify(payload []byte) (*types.Transaction, error) {
- return _VerifierProxy.Contract.Verify(&_VerifierProxy.TransactOpts, payload)
+func (_VerifierProxy *VerifierProxySession) Verify(payload []byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _VerifierProxy.Contract.Verify(&_VerifierProxy.TransactOpts, payload, parameterPayload)
}
-func (_VerifierProxy *VerifierProxyTransactorSession) Verify(payload []byte) (*types.Transaction, error) {
- return _VerifierProxy.Contract.Verify(&_VerifierProxy.TransactOpts, payload)
+func (_VerifierProxy *VerifierProxyTransactorSession) Verify(payload []byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _VerifierProxy.Contract.Verify(&_VerifierProxy.TransactOpts, payload, parameterPayload)
}
-func (_VerifierProxy *VerifierProxyTransactor) VerifyBulk(opts *bind.TransactOpts, payloads [][]byte) (*types.Transaction, error) {
- return _VerifierProxy.contract.Transact(opts, "verifyBulk", payloads)
+func (_VerifierProxy *VerifierProxyTransactor) VerifyBulk(opts *bind.TransactOpts, payloads [][]byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _VerifierProxy.contract.Transact(opts, "verifyBulk", payloads, parameterPayload)
}
-func (_VerifierProxy *VerifierProxySession) VerifyBulk(payloads [][]byte) (*types.Transaction, error) {
- return _VerifierProxy.Contract.VerifyBulk(&_VerifierProxy.TransactOpts, payloads)
+func (_VerifierProxy *VerifierProxySession) VerifyBulk(payloads [][]byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _VerifierProxy.Contract.VerifyBulk(&_VerifierProxy.TransactOpts, payloads, parameterPayload)
}
-func (_VerifierProxy *VerifierProxyTransactorSession) VerifyBulk(payloads [][]byte) (*types.Transaction, error) {
- return _VerifierProxy.Contract.VerifyBulk(&_VerifierProxy.TransactOpts, payloads)
+func (_VerifierProxy *VerifierProxyTransactorSession) VerifyBulk(payloads [][]byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _VerifierProxy.Contract.VerifyBulk(&_VerifierProxy.TransactOpts, payloads, parameterPayload)
}
type VerifierProxyAccessControllerSetIterator struct {
@@ -1335,9 +1335,9 @@ type VerifierProxyInterface interface {
UnsetVerifier(opts *bind.TransactOpts, configDigest [32]byte) (*types.Transaction, error)
- Verify(opts *bind.TransactOpts, payload []byte) (*types.Transaction, error)
+ Verify(opts *bind.TransactOpts, payload []byte, parameterPayload []byte) (*types.Transaction, error)
- VerifyBulk(opts *bind.TransactOpts, payloads [][]byte) (*types.Transaction, error)
+ VerifyBulk(opts *bind.TransactOpts, payloads [][]byte, parameterPayload []byte) (*types.Transaction, error)
FilterAccessControllerSet(opts *bind.FilterOpts) (*VerifierProxyAccessControllerSetIterator, error)
diff --git a/core/gethwrappers/llo-feeds/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/llo-feeds/generation/generated-wrapper-dependency-versions-do-not-edit.txt
index 2d83bfd786..4e097c0c83 100644
--- a/core/gethwrappers/llo-feeds/generation/generated-wrapper-dependency-versions-do-not-edit.txt
+++ b/core/gethwrappers/llo-feeds/generation/generated-wrapper-dependency-versions-do-not-edit.txt
@@ -1,9 +1,9 @@
GETH_VERSION: 1.12.0
errored_verifier: ../../../contracts/solc/v0.8.16/ErroredVerifier.abi ../../../contracts/solc/v0.8.16/ErroredVerifier.bin 510d18a58bfda646be35e46491baf73041eb333a349615465b20e2b5b41c5f73
exposed_verifier: ../../../contracts/solc/v0.8.16/ExposedVerifier.abi ../../../contracts/solc/v0.8.16/ExposedVerifier.bin 6932cea8f2738e874d3ec9e1a4231d2421704030c071d9e15dd2f7f08482c246
-fee_manager: ../../../contracts/solc/v0.8.16/FeeManager.abi ../../../contracts/solc/v0.8.16/FeeManager.bin 630d7dfa814579001a359e26d99ff9c1f76a6a6480b0140da91b9f20cc1ab8df
+fee_manager: ../../../contracts/solc/v0.8.16/FeeManager.abi ../../../contracts/solc/v0.8.16/FeeManager.bin cac01f18ad6eebac0c58d64fafa9a6076c00a91496bdc1e90aeb18e7b13a815c
llo_feeds: ../../../contracts/solc/v0.8.16/FeeManager.abi ../../../contracts/solc/v0.8.16/FeeManager.bin cb71e018f67e49d7bc0e194c822204dfd59f79ff42e4fc8fd8ab63f3acd71361
llo_feeds_test: ../../../contracts/solc/v0.8.16/ExposedVerifier.abi ../../../contracts/solc/v0.8.16/ExposedVerifier.bin 6932cea8f2738e874d3ec9e1a4231d2421704030c071d9e15dd2f7f08482c246
reward_manager: ../../../contracts/solc/v0.8.16/RewardManager.abi ../../../contracts/solc/v0.8.16/RewardManager.bin ec52c851ffe7ed00e05a68dbb363b2e01d38088ac829988b611653b30d10ec97
verifier: ../../../contracts/solc/v0.8.16/Verifier.abi ../../../contracts/solc/v0.8.16/Verifier.bin 135206eccb805c267392c398df385aa51b22db4d4c59fa1f31f0e5b0a607c812
-verifier_proxy: ../../../contracts/solc/v0.8.16/VerifierProxy.abi ../../../contracts/solc/v0.8.16/VerifierProxy.bin 92ad0416e999e9d55e4f00a8b7df616bb69ae27ce52994a6061598e95364d2cc
+verifier_proxy: ../../../contracts/solc/v0.8.16/VerifierProxy.abi ../../../contracts/solc/v0.8.16/VerifierProxy.bin 250e4066936535d57d8e3859dfd33fddc7abc525b0f81e1fe87d96f00663a74f
diff --git a/integration-tests/contracts/contract_models.go b/integration-tests/contracts/contract_models.go
index 7bcddceae5..9f1130dce9 100644
--- a/integration-tests/contracts/contract_models.go
+++ b/integration-tests/contracts/contract_models.go
@@ -375,6 +375,6 @@ type MercuryVerifier interface {
type MercuryVerifierProxy interface {
Address() string
- Verify(signedReport []byte, value *big.Int) (*types.Transaction, error)
- VerifyBulk(signedReports [][]byte, value *big.Int) (*types.Transaction, error)
+ Verify(signedReport []byte, parameterPayload []byte, value *big.Int) (*types.Transaction, error)
+ VerifyBulk(signedReports [][]byte, parameterPayload []byte, value *big.Int) (*types.Transaction, error)
}
diff --git a/integration-tests/contracts/ethereum_contracts.go b/integration-tests/contracts/ethereum_contracts.go
index d11eefecd4..d3db6913c5 100644
--- a/integration-tests/contracts/ethereum_contracts.go
+++ b/integration-tests/contracts/ethereum_contracts.go
@@ -2297,7 +2297,7 @@ func (e *EthereumMercuryVerifierProxy) Address() string {
return e.address.Hex()
}
-func (e *EthereumMercuryVerifierProxy) Verify(signedReport []byte, value *big.Int) (*types.Transaction, error) {
+func (e *EthereumMercuryVerifierProxy) Verify(signedReport []byte, parameterPayload []byte, value *big.Int) (*types.Transaction, error) {
opts, err := e.client.TransactionOpts(e.client.GetDefaultWallet())
if value != nil {
opts.Value = value
@@ -2305,14 +2305,14 @@ func (e *EthereumMercuryVerifierProxy) Verify(signedReport []byte, value *big.In
if err != nil {
return nil, err
}
- tx, err := e.instance.Verify(opts, signedReport)
+ tx, err := e.instance.Verify(opts, parameterPayload, signedReport)
if err != nil {
return nil, err
}
return tx, e.client.ProcessTransaction(tx)
}
-func (e *EthereumMercuryVerifierProxy) VerifyBulk(signedReports [][]byte, value *big.Int) (*types.Transaction, error) {
+func (e *EthereumMercuryVerifierProxy) VerifyBulk(signedReports [][]byte, parameterPayload []byte, value *big.Int) (*types.Transaction, error) {
opts, err := e.client.TransactionOpts(e.client.GetDefaultWallet())
if value != nil {
opts.Value = value
@@ -2320,7 +2320,7 @@ func (e *EthereumMercuryVerifierProxy) VerifyBulk(signedReports [][]byte, value
if err != nil {
return nil, err
}
- tx, err := e.instance.VerifyBulk(opts, signedReports)
+ tx, err := e.instance.VerifyBulk(opts, signedReports, parameterPayload)
if err != nil {
return nil, err
}
From c827d6a324a69e73d6f3cdc0ed8760467a876e37 Mon Sep 17 00:00:00 2001
From: Chris Cushman <104409744+vreff@users.noreply.github.com>
Date: Tue, 19 Sep 2023 16:31:14 -0400
Subject: [PATCH 27/31] Fix VRF foundry tests for nightly build version
(#10717)
* Fix VRF foundry tests for nightly build version
* prettier
* Add foundry test trigger for CI
---------
Co-authored-by: Austin Born
---
.github/workflows/solidity-foundry.yml | 1 +
.../test/v0.8/foundry/vrf/VRFV2Plus.t.sol | 56 +++++++++----------
2 files changed, 29 insertions(+), 28 deletions(-)
diff --git a/.github/workflows/solidity-foundry.yml b/.github/workflows/solidity-foundry.yml
index 29022197bd..8f0181640e 100644
--- a/.github/workflows/solidity-foundry.yml
+++ b/.github/workflows/solidity-foundry.yml
@@ -21,6 +21,7 @@ jobs:
filters: |
src:
- 'contracts/src/v0.8/**/*'
+ - 'contracts/test/v0.8/foundry/**/*'
- '.github/workflows/solidity-foundry.yml'
- 'contracts/foundry.toml'
- 'contracts/gas-snapshots/*.gas-snapshot'
diff --git a/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol b/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol
index 80a94730ff..9eb3550a8f 100644
--- a/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol
+++ b/contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol
@@ -282,15 +282,15 @@ contract VRFV2Plus is BaseTest {
// Store the previous block's blockhash, and assert that it is as expected.
vm.roll(requestBlock + 1);
s_bhs.store(requestBlock);
- assertEq(bytes32(uint256(requestBlock)), s_bhs.getBlockhash(requestBlock));
+ assertEq(hex"c65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8", s_bhs.getBlockhash(requestBlock));
// Fulfill the request.
// Proof generated via the generate-proof-v2-plus script command. Example usage:
/*
go run . generate-proof-v2-plus \
-key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \
- -pre-seed 93724884573574303181157854277074121673523280784530506403108144933983063023487 \
- -block-hash 0x000000000000000000000000000000000000000000000000000000000000000a \
+ -pre-seed 53391429126065232382402681707515137895470547057819816488254124798726362946635 \
+ -block-hash 0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8 \
-block-num 10 \
-sender 0x90A8820424CC8a819d14cBdE54D12fD3fbFa9bb2 \
-native-payment true
@@ -301,22 +301,22 @@ contract VRFV2Plus is BaseTest {
62070622898698443831883535403436258712770888294397026493185421712108624767191
],
gamma: [
- 51111463251706978184511913295560024261167135799300172382907308330135472647507,
- 41885656274025752055847945432737871864088659248922821023734315208027501951872
+ 2973102176083872659982988645522968133664529102555885971868619302367987919116,
+ 43610558806647181042154132372309425100765955827430056035281841579494767100593
],
- c: 16524568342669389118511849307228542933779732546262509461687493305210182275018,
- s: 41994650358817457338836417117109954917585544148583960677058620868924739846555,
- seed: 93724884573574303181157854277074121673523280784530506403108144933983063023487,
- uWitness: 0x239F36bb6F40B875feDB78A35668ED503714229D,
+ c: 44558436621153210954487996771157467729629491520915192177070584116261579650304,
+ s: 18447217702001910909971999949841419857536434117467121546901211519652998560328,
+ seed: 53391429126065232382402681707515137895470547057819816488254124798726362946635,
+ uWitness: 0x61e70839187C12Fe136bdcC78D1D3765BecA245d,
cGammaWitness: [
- 39509254444382483930263995092200486700241035538419529811079167788988152938775,
- 45386456067856204990374891906500133027941582609057652148999284389995660222714
+ 57868024672571504735938309170346165090467827794150592801232968679608710558443,
+ 19249635816589941728350586356475545703589085434839461964712223344491075318152
],
sHashWitness: [
- 111625720767470372476405191521859549066251564741183518661578940869038469627728,
- 102482035245447833089088394562631090129269030797203395897444301192092668485625
+ 61151023867440095994162103308586528914977848168432699421313437043942463394142,
+ 107161674609768447269383119603000260750848712436031813376573304048979100187696
],
- zInv: 46854489406365983023053639507653417780777725139199393583659574012051139260916
+ zInv: 92231836131549905872346812799402691650433126386650679876913933650318463342041
});
VRFCoordinatorV2Plus.RequestCommitment memory rc = VRFCoordinatorV2Plus.RequestCommitment({
blockNum: requestBlock,
@@ -399,15 +399,15 @@ contract VRFV2Plus is BaseTest {
// Store the previous block's blockhash, and assert that it is as expected.
vm.roll(requestBlock + 1);
s_bhs.store(requestBlock);
- assertEq(bytes32(uint256(requestBlock)), s_bhs.getBlockhash(requestBlock));
+ assertEq(hex"ce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec", s_bhs.getBlockhash(requestBlock));
// Fulfill the request.
// Proof generated via the generate-proof-v2-plus script command. Example usage:
/*
go run . generate-proof-v2-plus \
-key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \
- -pre-seed 108233140904510496268355288815996296196427471042093167619305836589216327096601 \
- -block-hash 0x0000000000000000000000000000000000000000000000000000000000000014 \
+ -pre-seed 14817911724325909152780695848148728017190840227899344848185245004944693487904 \
+ -block-hash 0xce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec \
-block-num 20 \
-sender 0x90A8820424CC8a819d14cBdE54D12fD3fbFa9bb2
*/
@@ -417,22 +417,22 @@ contract VRFV2Plus is BaseTest {
62070622898698443831883535403436258712770888294397026493185421712108624767191
],
gamma: [
- 49785247270467418393187938018746488660500261614113251546613288843777654841004,
- 8320717868018488740308781441198484312662094766876176838868269181386589318272
+ 33866404953216897461413961842321788789902210776565180957857448351149268461878,
+ 115311460432520855364215812517921508651759645277579047898967111537639679255245
],
- c: 76453805415479914665188560136648688491255275134351022531196270897692316685243,
- s: 22475315809542512110111038532919582593833813393763591614796010376988981373422,
- seed: 108233140904510496268355288815996296196427471042093167619305836589216327096601,
- uWitness: 0x5FEaCA3fb4754440E6a2A9954FC9239C598575D6,
+ c: 32561838617228634441320154326890637858849550728945663611942735469609183032389,
+ s: 55806041637816588920133401262818662941786708593795051215322306020699218819370,
+ seed: 14817911724325909152780695848148728017190840227899344848185245004944693487904,
+ uWitness: 0x917554f18dB75eac206Ae5366B80c0b6A87b5996,
cGammaWitness: [
- 55445396003779478156538753672495726993840482493921680192868130506843942678541,
- 106319974075683500018668841039963899149060186085112051787355016812064025102025
+ 84076069514674055711740813040098459867759972960517070154541804330775196519927,
+ 23456142794899412334950030002327578074149212885334118042147040122102091306080
],
sHashWitness: [
- 34533061775486739812426491689767238316751877347882380297143821485918957938090,
- 2922713080913931101723342979079557154957284247074698150345640807351459691338
+ 67919054534004130885903575144858988177160334233773664996450084407340736891592,
+ 82934864721844704662104532515068228502043057799129930869203380251475000254135
],
- zInv: 5351690486803355464662962731889988792533544566214255216629618109252893229562
+ zInv: 37397948970756055003892765560695914630264479979131589134478580629419519112029
});
VRFCoordinatorV2Plus.RequestCommitment memory rc = VRFCoordinatorV2Plus.RequestCommitment({
blockNum: requestBlock,
From 90154196c02cd3e9ae95bded6944c7a5d299877d Mon Sep 17 00:00:00 2001
From: Adam Hamrick
Date: Tue, 19 Sep 2023 18:12:14 -0400
Subject: [PATCH 28/31] [TT-577] Finally Fixes Scheduled Runs (#10707)
* Finally Fixes Scheduled Runs
* Schedule conformity
* Fix schedule
---
.github/workflows/integration-tests.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index 8455df90aa..91acdfea08 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -807,7 +807,7 @@ jobs:
testnet-smoke-tests-notify:
name: Live Testnet Start Slack Thread
- if: ${{ needs.*.result != 'skipped' }}
+ if: ${{ github.event_name == 'schedule' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) && needs.*.result != 'skipped' }}
environment: integration
outputs:
thread_ts: ${{ steps.slack.outputs.thread_ts }}
@@ -859,7 +859,7 @@ jobs:
testnet-smoke-tests-results:
name: Post Live Testnet Smoke Test Results
- if: ${{ needs.*.result != 'skipped' }}
+ if: ${{ github.event_name == 'schedule' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) && needs.*.result != 'skipped' }}
environment: integration
permissions:
checks: write
From c32eb838dc0acf3870cb419a5dc550b96c2354f7 Mon Sep 17 00:00:00 2001
From: amit-momin <108959691+amit-momin@users.noreply.github.com>
Date: Tue, 19 Sep 2023 17:55:05 -0500
Subject: [PATCH 29/31] Update fluxmonitor to use IdempotencyKey when creating
Tx (#10589)
* Updated fluxmonitor to use IdempotencyKey when creating Tx
* Randomly generate idempotency key for fluxmonitor tests
---
.../fluxmonitorv2/contract_submitter.go | 7 +--
.../fluxmonitorv2/contract_submitter_test.go | 7 ++-
core/services/fluxmonitorv2/flux_monitor.go | 5 +-
.../fluxmonitorv2/flux_monitor_test.go | 60 ++++++++++++-------
.../fluxmonitorv2/mocks/contract_submitter.go | 19 ++----
core/services/fluxmonitorv2/mocks/orm.go | 17 ++----
core/services/fluxmonitorv2/orm.go | 7 ++-
core/services/fluxmonitorv2/orm_test.go | 5 +-
8 files changed, 66 insertions(+), 61 deletions(-)
diff --git a/core/services/fluxmonitorv2/contract_submitter.go b/core/services/fluxmonitorv2/contract_submitter.go
index fe1db28139..d60f5b70e0 100644
--- a/core/services/fluxmonitorv2/contract_submitter.go
+++ b/core/services/fluxmonitorv2/contract_submitter.go
@@ -7,7 +7,6 @@ import (
evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/flux_aggregator_wrapper"
- "github.com/smartcontractkit/chainlink/v2/core/services/pg"
)
//go:generate mockery --quiet --name ContractSubmitter --output ./mocks/ --case=underscore
@@ -17,7 +16,7 @@ var FluxAggregatorABI = evmtypes.MustGetABI(flux_aggregator_wrapper.FluxAggregat
// ContractSubmitter defines an interface to submit an eth tx.
type ContractSubmitter interface {
- Submit(roundID *big.Int, submission *big.Int, qopts ...pg.QOpt) error
+ Submit(roundID *big.Int, submission *big.Int, idempotencyKey *string) error
}
// FluxAggregatorContractSubmitter submits the polled answer in an eth tx.
@@ -51,7 +50,7 @@ func NewFluxAggregatorContractSubmitter(
// Submit submits the answer by writing a EthTx for the txmgr to
// pick up
-func (c *FluxAggregatorContractSubmitter) Submit(roundID *big.Int, submission *big.Int, qopts ...pg.QOpt) error {
+func (c *FluxAggregatorContractSubmitter) Submit(roundID *big.Int, submission *big.Int, idempotencyKey *string) error {
fromAddress, err := c.keyStore.GetRoundRobinAddress(c.chainID)
if err != nil {
return err
@@ -63,7 +62,7 @@ func (c *FluxAggregatorContractSubmitter) Submit(roundID *big.Int, submission *b
}
return errors.Wrap(
- c.orm.CreateEthTransaction(fromAddress, c.Address(), payload, c.gasLimit, qopts...),
+ c.orm.CreateEthTransaction(fromAddress, c.Address(), payload, c.gasLimit, idempotencyKey),
"failed to send Eth transaction",
)
}
diff --git a/core/services/fluxmonitorv2/contract_submitter_test.go b/core/services/fluxmonitorv2/contract_submitter_test.go
index 1585810ab8..7c282e3190 100644
--- a/core/services/fluxmonitorv2/contract_submitter_test.go
+++ b/core/services/fluxmonitorv2/contract_submitter_test.go
@@ -4,6 +4,7 @@ import (
"math/big"
"testing"
+ "github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/smartcontractkit/chainlink/v2/core/internal/mocks"
@@ -32,8 +33,10 @@ func TestFluxAggregatorContractSubmitter_Submit(t *testing.T) {
keyStore.On("GetRoundRobinAddress", testutils.FixtureChainID).Return(fromAddress, nil)
fluxAggregator.On("Address").Return(toAddress)
- orm.On("CreateEthTransaction", fromAddress, toAddress, payload, gasLimit).Return(nil)
- err = submitter.Submit(roundID, submission)
+ idempotencyKey := uuid.New().String()
+ orm.On("CreateEthTransaction", fromAddress, toAddress, payload, gasLimit, &idempotencyKey).Return(nil)
+
+ err = submitter.Submit(roundID, submission, &idempotencyKey)
assert.NoError(t, err)
}
diff --git a/core/services/fluxmonitorv2/flux_monitor.go b/core/services/fluxmonitorv2/flux_monitor.go
index 34ca121e9a..11e9b25be0 100644
--- a/core/services/fluxmonitorv2/flux_monitor.go
+++ b/core/services/fluxmonitorv2/flux_monitor.go
@@ -1073,13 +1073,16 @@ func (fm *FluxMonitor) initialRoundState() flux_aggregator_wrapper.OracleRoundSt
}
func (fm *FluxMonitor) queueTransactionForTxm(tx pg.Queryer, runID int64, answer decimal.Decimal, roundID uint32, log *flux_aggregator_wrapper.FluxAggregatorNewRound) error {
+ // Use pipeline run ID to generate globally unique key that can correlate this run to a Tx
+ idempotencyKey := fmt.Sprintf("fluxmonitor-%d", runID)
// Submit the Eth Tx
err := fm.contractSubmitter.Submit(
new(big.Int).SetInt64(int64(roundID)),
answer.BigInt(),
- pg.WithQueryer(tx),
+ &idempotencyKey,
)
if err != nil {
+ fm.logger.Errorw("failed to submit Tx to TXM", "err", err)
return err
}
diff --git a/core/services/fluxmonitorv2/flux_monitor_test.go b/core/services/fluxmonitorv2/flux_monitor_test.go
index 5a67c2fa1d..e165ce6820 100644
--- a/core/services/fluxmonitorv2/flux_monitor_test.go
+++ b/core/services/fluxmonitorv2/flux_monitor_test.go
@@ -1,6 +1,7 @@
package fluxmonitorv2_test
import (
+ "fmt"
"math/big"
"strings"
"testing"
@@ -130,6 +131,11 @@ func setupMocks(t *testing.T) *testMocks {
return tm
}
+func buildIdempotencyKey(ID int64) *string {
+ key := fmt.Sprintf("fluxmonitor-%d", ID)
+ return &key
+}
+
type setupOptions struct {
pollTickerDisabled bool
idleTimerDisabled bool
@@ -449,7 +455,7 @@ func TestFluxMonitor_PollIfEligible(t *testing.T) {
},
},
), mock.Anything).
- Return(pipeline.Run{}, pipeline.TaskRunResults{
+ Return(run, pipeline.TaskRunResults{
{
Result: pipeline.Result{
Value: decimal.NewFromInt(answers.polledAnswer),
@@ -468,7 +474,7 @@ func TestFluxMonitor_PollIfEligible(t *testing.T) {
}).
Once()
tm.contractSubmitter.
- On("Submit", big.NewInt(reportableRoundID), big.NewInt(answers.polledAnswer), mock.Anything).
+ On("Submit", big.NewInt(reportableRoundID), big.NewInt(answers.polledAnswer), buildIdempotencyKey(run.ID)).
Return(nil).
Once()
@@ -578,6 +584,7 @@ func TestPollingDeviationChecker_BuffersLogs(t *testing.T) {
tm.orm.On("MostRecentFluxMonitorRoundID", contractAddress).Return(uint32(4), nil)
// Round 1
+ run := pipeline.Run{ID: 1}
tm.orm.
On("FindOrCreateFluxMonitorRoundStats", contractAddress, uint32(1), mock.Anything).
Return(fluxmonitorv2.FluxMonitorRoundStatsV2{
@@ -586,7 +593,7 @@ func TestPollingDeviationChecker_BuffersLogs(t *testing.T) {
}, nil)
tm.pipelineRunner.
On("ExecuteRun", mock.Anything, pipelineSpec, mock.Anything, mock.Anything).
- Return(pipeline.Run{}, pipeline.TaskRunResults{
+ Return(run, pipeline.TaskRunResults{
{
Result: pipeline.Result{
Value: decimal.NewFromInt(fetchedValue),
@@ -594,15 +601,15 @@ func TestPollingDeviationChecker_BuffersLogs(t *testing.T) {
},
Task: &pipeline.HTTPTask{},
},
- }, nil)
+ }, nil).Once()
tm.pipelineRunner.
On("InsertFinishedRun", mock.Anything, mock.Anything, mock.Anything, mock.Anything).
Return(nil).
Run(func(args mock.Arguments) {
args.Get(0).(*pipeline.Run).ID = 1
- })
+ }).Once()
tm.contractSubmitter.
- On("Submit", big.NewInt(1), big.NewInt(fetchedValue), mock.Anything).
+ On("Submit", big.NewInt(1), big.NewInt(fetchedValue), buildIdempotencyKey(run.ID)).
Return(nil).
Once()
@@ -617,6 +624,7 @@ func TestPollingDeviationChecker_BuffersLogs(t *testing.T) {
Return(nil).Once()
// Round 3
+ run = pipeline.Run{ID: 2}
tm.orm.
On("FindOrCreateFluxMonitorRoundStats", contractAddress, uint32(3), mock.Anything).
Return(fluxmonitorv2.FluxMonitorRoundStatsV2{
@@ -625,7 +633,7 @@ func TestPollingDeviationChecker_BuffersLogs(t *testing.T) {
}, nil)
tm.pipelineRunner.
On("ExecuteRun", mock.Anything, pipelineSpec, mock.Anything, mock.Anything).
- Return(pipeline.Run{}, pipeline.TaskRunResults{
+ Return(run, pipeline.TaskRunResults{
{
Result: pipeline.Result{
Value: decimal.NewFromInt(fetchedValue),
@@ -633,15 +641,15 @@ func TestPollingDeviationChecker_BuffersLogs(t *testing.T) {
},
Task: &pipeline.HTTPTask{},
},
- }, nil)
+ }, nil).Once()
tm.pipelineRunner.
On("InsertFinishedRun", mock.Anything, mock.Anything, mock.Anything, mock.Anything).
Return(nil).
Run(func(args mock.Arguments) {
args.Get(0).(*pipeline.Run).ID = 2
- })
+ }).Once()
tm.contractSubmitter.
- On("Submit", big.NewInt(3), big.NewInt(fetchedValue), mock.Anything).
+ On("Submit", big.NewInt(3), big.NewInt(fetchedValue), buildIdempotencyKey(run.ID)).
Return(nil).
Once()
tm.orm.
@@ -655,6 +663,7 @@ func TestPollingDeviationChecker_BuffersLogs(t *testing.T) {
Return(nil).Once()
// Round 4
+ run = pipeline.Run{ID: 3}
tm.orm.
On("FindOrCreateFluxMonitorRoundStats", contractAddress, uint32(4), mock.Anything).
Return(fluxmonitorv2.FluxMonitorRoundStatsV2{
@@ -663,7 +672,7 @@ func TestPollingDeviationChecker_BuffersLogs(t *testing.T) {
}, nil)
tm.pipelineRunner.
On("ExecuteRun", mock.Anything, pipelineSpec, mock.Anything, mock.Anything).
- Return(pipeline.Run{}, pipeline.TaskRunResults{
+ Return(run, pipeline.TaskRunResults{
{
Result: pipeline.Result{
Value: decimal.NewFromInt(fetchedValue),
@@ -671,15 +680,15 @@ func TestPollingDeviationChecker_BuffersLogs(t *testing.T) {
},
Task: &pipeline.HTTPTask{},
},
- }, nil)
+ }, nil).Once()
tm.pipelineRunner.
On("InsertFinishedRun", mock.Anything, mock.Anything, mock.Anything, mock.Anything).
Return(nil).
Run(func(args mock.Arguments) {
args.Get(0).(*pipeline.Run).ID = 3
- })
+ }).Once()
tm.contractSubmitter.
- On("Submit", big.NewInt(4), big.NewInt(fetchedValue), mock.Anything).
+ On("Submit", big.NewInt(4), big.NewInt(fetchedValue), buildIdempotencyKey(run.ID)).
Return(nil).
Once()
tm.orm.
@@ -1475,6 +1484,8 @@ func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) {
answer = 100
)
+ run := pipeline.Run{ID: 1}
+
tm.keyStore.On("EnabledKeysForChain", testutils.FixtureChainID).Return([]ethkey.KeyV2{{Address: nodeAddr}}, nil).Once()
tm.logBroadcaster.On("IsConnected").Return(true).Maybe()
@@ -1488,7 +1499,7 @@ func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) {
}, nil).Once()
tm.pipelineRunner.
On("ExecuteRun", mock.Anything, pipelineSpec, mock.Anything, mock.Anything).
- Return(pipeline.Run{}, pipeline.TaskRunResults{
+ Return(run, pipeline.TaskRunResults{
{
Result: pipeline.Result{
Value: decimal.NewFromInt(answer),
@@ -1504,7 +1515,7 @@ func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) {
args.Get(0).(*pipeline.Run).ID = 1
})
tm.logBroadcaster.On("MarkConsumed", mock.Anything, mock.Anything).Return(nil).Once()
- tm.contractSubmitter.On("Submit", big.NewInt(roundID), big.NewInt(answer), mock.Anything).Return(nil).Once()
+ tm.contractSubmitter.On("Submit", big.NewInt(roundID), big.NewInt(answer), buildIdempotencyKey(run.ID)).Return(nil).Once()
tm.orm.
On("UpdateFluxMonitorRoundStats",
contractAddress,
@@ -1588,6 +1599,8 @@ func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) {
roundID = 3
answer = 100
)
+
+ run := pipeline.Run{ID: 1}
tm.keyStore.On("EnabledKeysForChain", testutils.FixtureChainID).Return([]ethkey.KeyV2{{Address: nodeAddr}}, nil).Once()
tm.logBroadcaster.On("IsConnected").Return(true).Maybe()
@@ -1614,7 +1627,7 @@ func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) {
}, nil).Once()
tm.pipelineRunner.
On("ExecuteRun", mock.Anything, pipelineSpec, mock.Anything, mock.Anything).
- Return(pipeline.Run{}, pipeline.TaskRunResults{
+ Return(run, pipeline.TaskRunResults{
{
Result: pipeline.Result{
Value: decimal.NewFromInt(answer),
@@ -1629,7 +1642,7 @@ func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) {
Run(func(args mock.Arguments) {
args.Get(0).(*pipeline.Run).ID = 1
})
- tm.contractSubmitter.On("Submit", big.NewInt(roundID), big.NewInt(answer), mock.Anything).Return(nil).Once()
+ tm.contractSubmitter.On("Submit", big.NewInt(roundID), big.NewInt(answer), buildIdempotencyKey(run.ID)).Return(nil).Once()
tm.orm.
On("UpdateFluxMonitorRoundStats",
contractAddress,
@@ -1683,6 +1696,7 @@ func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) {
roundID = 3
answer = 100
)
+ run := pipeline.Run{ID: 1}
tm.keyStore.On("EnabledKeysForChain", testutils.FixtureChainID).Return([]ethkey.KeyV2{{Address: nodeAddr}}, nil).Once()
tm.logBroadcaster.On("IsConnected").Return(true).Maybe()
@@ -1709,7 +1723,7 @@ func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) {
}, nil).Once()
tm.pipelineRunner.
On("ExecuteRun", mock.Anything, pipelineSpec, mock.Anything, mock.Anything).
- Return(pipeline.Run{}, pipeline.TaskRunResults{
+ Return(run, pipeline.TaskRunResults{
{
Result: pipeline.Result{
Value: decimal.NewFromInt(answer),
@@ -1724,7 +1738,7 @@ func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) {
Run(func(args mock.Arguments) {
args.Get(0).(*pipeline.Run).ID = 1
})
- tm.contractSubmitter.On("Submit", big.NewInt(roundID), big.NewInt(answer), mock.Anything).Return(nil).Once()
+ tm.contractSubmitter.On("Submit", big.NewInt(roundID), big.NewInt(answer), buildIdempotencyKey(run.ID)).Return(nil).Once()
tm.orm.
On("UpdateFluxMonitorRoundStats",
contractAddress,
@@ -1797,7 +1811,7 @@ func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) {
Once()
// and that should result in a new submission
- tm.contractSubmitter.On("Submit", big.NewInt(olderRoundID), big.NewInt(answer), mock.Anything).Return(nil).Once()
+ tm.contractSubmitter.On("Submit", big.NewInt(olderRoundID), big.NewInt(answer), buildIdempotencyKey(run.ID)).Return(nil).Once()
tm.orm.
On("UpdateFluxMonitorRoundStats",
@@ -1887,7 +1901,7 @@ func TestFluxMonitor_DrumbeatTicker(t *testing.T) {
},
},
), mock.Anything).
- Return(pipeline.Run{}, pipeline.TaskRunResults{
+ Return(pipeline.Run{ID: runID}, pipeline.TaskRunResults{
{
Result: pipeline.Result{
Value: decimal.NewFromInt(fetchedAnswer),
@@ -1905,7 +1919,7 @@ func TestFluxMonitor_DrumbeatTicker(t *testing.T) {
}).
Once()
tm.contractSubmitter.
- On("Submit", big.NewInt(int64(roundID)), answerBigInt, mock.Anything).
+ On("Submit", big.NewInt(int64(roundID)), answerBigInt, buildIdempotencyKey(runID)).
Return(nil).
Once()
diff --git a/core/services/fluxmonitorv2/mocks/contract_submitter.go b/core/services/fluxmonitorv2/mocks/contract_submitter.go
index fd1469c1b9..6214255ff6 100644
--- a/core/services/fluxmonitorv2/mocks/contract_submitter.go
+++ b/core/services/fluxmonitorv2/mocks/contract_submitter.go
@@ -6,8 +6,6 @@ import (
big "math/big"
mock "github.com/stretchr/testify/mock"
-
- pg "github.com/smartcontractkit/chainlink/v2/core/services/pg"
)
// ContractSubmitter is an autogenerated mock type for the ContractSubmitter type
@@ -15,20 +13,13 @@ type ContractSubmitter struct {
mock.Mock
}
-// Submit provides a mock function with given fields: roundID, submission, qopts
-func (_m *ContractSubmitter) Submit(roundID *big.Int, submission *big.Int, qopts ...pg.QOpt) error {
- _va := make([]interface{}, len(qopts))
- for _i := range qopts {
- _va[_i] = qopts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, roundID, submission)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
+// Submit provides a mock function with given fields: roundID, submission, idempotencyKey
+func (_m *ContractSubmitter) Submit(roundID *big.Int, submission *big.Int, idempotencyKey *string) error {
+ ret := _m.Called(roundID, submission, idempotencyKey)
var r0 error
- if rf, ok := ret.Get(0).(func(*big.Int, *big.Int, ...pg.QOpt) error); ok {
- r0 = rf(roundID, submission, qopts...)
+ if rf, ok := ret.Get(0).(func(*big.Int, *big.Int, *string) error); ok {
+ r0 = rf(roundID, submission, idempotencyKey)
} else {
r0 = ret.Error(0)
}
diff --git a/core/services/fluxmonitorv2/mocks/orm.go b/core/services/fluxmonitorv2/mocks/orm.go
index 705c2e8b2b..1f2303fbf1 100644
--- a/core/services/fluxmonitorv2/mocks/orm.go
+++ b/core/services/fluxmonitorv2/mocks/orm.go
@@ -39,20 +39,13 @@ func (_m *ORM) CountFluxMonitorRoundStats() (int, error) {
return r0, r1
}
-// CreateEthTransaction provides a mock function with given fields: fromAddress, toAddress, payload, gasLimit, qopts
-func (_m *ORM) CreateEthTransaction(fromAddress common.Address, toAddress common.Address, payload []byte, gasLimit uint32, qopts ...pg.QOpt) error {
- _va := make([]interface{}, len(qopts))
- for _i := range qopts {
- _va[_i] = qopts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, fromAddress, toAddress, payload, gasLimit)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
+// CreateEthTransaction provides a mock function with given fields: fromAddress, toAddress, payload, gasLimit, idempotencyKey
+func (_m *ORM) CreateEthTransaction(fromAddress common.Address, toAddress common.Address, payload []byte, gasLimit uint32, idempotencyKey *string) error {
+ ret := _m.Called(fromAddress, toAddress, payload, gasLimit, idempotencyKey)
var r0 error
- if rf, ok := ret.Get(0).(func(common.Address, common.Address, []byte, uint32, ...pg.QOpt) error); ok {
- r0 = rf(fromAddress, toAddress, payload, gasLimit, qopts...)
+ if rf, ok := ret.Get(0).(func(common.Address, common.Address, []byte, uint32, *string) error); ok {
+ r0 = rf(fromAddress, toAddress, payload, gasLimit, idempotencyKey)
} else {
r0 = ret.Error(0)
}
diff --git a/core/services/fluxmonitorv2/orm.go b/core/services/fluxmonitorv2/orm.go
index c2f99c8345..70ebd2e702 100644
--- a/core/services/fluxmonitorv2/orm.go
+++ b/core/services/fluxmonitorv2/orm.go
@@ -26,7 +26,7 @@ type ORM interface {
DeleteFluxMonitorRoundsBackThrough(aggregator common.Address, roundID uint32) error
FindOrCreateFluxMonitorRoundStats(aggregator common.Address, roundID uint32, newRoundLogs uint) (FluxMonitorRoundStatsV2, error)
UpdateFluxMonitorRoundStats(aggregator common.Address, roundID uint32, runID int64, newRoundLogsAddition uint, qopts ...pg.QOpt) error
- CreateEthTransaction(fromAddress, toAddress common.Address, payload []byte, gasLimit uint32, qopts ...pg.QOpt) error
+ CreateEthTransaction(fromAddress, toAddress common.Address, payload []byte, gasLimit uint32, idempotencyKey *string) error
CountFluxMonitorRoundStats() (count int, err error)
}
@@ -118,16 +118,17 @@ func (o *orm) CreateEthTransaction(
toAddress common.Address,
payload []byte,
gasLimit uint32,
- qopts ...pg.QOpt,
+ idempotencyKey *string,
) (err error) {
_, err = o.txm.CreateTransaction(txmgr.TxRequest{
+ IdempotencyKey: idempotencyKey,
FromAddress: fromAddress,
ToAddress: toAddress,
EncodedPayload: payload,
FeeLimit: gasLimit,
Strategy: o.strategy,
Checker: o.checker,
- }, qopts...)
+ })
return errors.Wrap(err, "Skipped Flux Monitor submission")
}
diff --git a/core/services/fluxmonitorv2/orm_test.go b/core/services/fluxmonitorv2/orm_test.go
index 1377737c49..a24f516c7f 100644
--- a/core/services/fluxmonitorv2/orm_test.go
+++ b/core/services/fluxmonitorv2/orm_test.go
@@ -185,8 +185,9 @@ func TestORM_CreateEthTransaction(t *testing.T) {
payload = []byte{1, 0, 0}
gasLimit = uint32(21000)
)
-
+ idempotencyKey := uuid.New().String()
txm.On("CreateTransaction", txmgr.TxRequest{
+ IdempotencyKey: &idempotencyKey,
FromAddress: from,
ToAddress: to,
EncodedPayload: payload,
@@ -195,5 +196,5 @@ func TestORM_CreateEthTransaction(t *testing.T) {
Strategy: strategy,
}).Return(txmgr.Tx{}, nil).Once()
- require.NoError(t, orm.CreateEthTransaction(from, to, payload, gasLimit))
+ require.NoError(t, orm.CreateEthTransaction(from, to, payload, gasLimit, &idempotencyKey))
}
From c0389f26f9f1327d996706950a772560515fde54 Mon Sep 17 00:00:00 2001
From: Morgan Kuphal <87319522+KuphJr@users.noreply.github.com>
Date: Tue, 19 Sep 2023 20:53:24 -0500
Subject: [PATCH 30/31] Improved logs (#10668)
---
core/services/functions/listener.go | 6 +++++-
core/services/functions/models.go | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/core/services/functions/listener.go b/core/services/functions/listener.go
index e0bf5b79b0..afdc1b7963 100644
--- a/core/services/functions/listener.go
+++ b/core/services/functions/listener.go
@@ -689,7 +689,11 @@ func (l *FunctionsListener) getSecrets(ctx context.Context, eaClient ExternalAda
switch requestData.SecretsLocation {
case LocationInline:
- l.logger.Warnw("request used Inline secrets location, processing with no secrets", "requestID", requestIDStr)
+ if len(requestData.Secrets) > 0 {
+ l.logger.Warnw("request used Inline secrets location, processing with no secrets", "requestID", requestIDStr)
+ } else {
+ l.logger.Debugw("request does not use any secrets", "requestID", requestIDStr)
+ }
return "", nil, nil
case LocationRemote:
thresholdEncSecrets, userError, err := eaClient.FetchEncryptedSecrets(ctx, requestData.Secrets, requestIDStr, l.job.Name.ValueOrZero())
diff --git a/core/services/functions/models.go b/core/services/functions/models.go
index 88bebce1e2..2dadf3daf5 100644
--- a/core/services/functions/models.go
+++ b/core/services/functions/models.go
@@ -109,7 +109,7 @@ func CheckStateTransition(prev RequestState, next RequestState) error {
},
FINALIZED: {
IN_PROGRESS: errors.New("cannot go back from FINALIZED to IN_PROGRESS"),
- RESULT_READY: errors.New("cannot go back from FINALIZED to RESULT_READY"),
+ RESULT_READY: errors.New("cannot go back from FINALIZED to RESULT_READY, result was already finalized by DON before this request was picked up"),
TIMED_OUT: nil, // timed out while in transmission - no reason to attempt sending it any more
FINALIZED: sameStateError,
CONFIRMED: nil, // received an on-chain result confirmation
From cab7594b389c584e90561146a9386842747ae3cc Mon Sep 17 00:00:00 2001
From: Rens Rooimans
Date: Wed, 20 Sep 2023 12:10:29 +0200
Subject: [PATCH 31/31] regen wrapper and rm extra wrapper entries
---
.../generated/llo_feeds/llo_feeds.go | 32 +++++++++----------
...rapper-dependency-versions-do-not-edit.txt | 2 +-
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/core/gethwrappers/generated/llo_feeds/llo_feeds.go b/core/gethwrappers/generated/llo_feeds/llo_feeds.go
index aa607342b4..708dcbf51f 100644
--- a/core/gethwrappers/generated/llo_feeds/llo_feeds.go
+++ b/core/gethwrappers/generated/llo_feeds/llo_feeds.go
@@ -36,8 +36,8 @@ type CommonAddressAndWeight struct {
}
var LLOVerifierProxyMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"accessController\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BadVerification\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"ConfigDigestAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FeeManagerInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"VerifierAlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VerifierInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"VerifierNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessController\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessController\",\"type\":\"address\"}],\"name\":\"AccessControllerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldFeeManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newFeeManager\",\"type\":\"address\"}],\"name\":\"FeeManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"oldConfigDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"newConfigDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierUnset\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"initializeVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_accessController\",\"outputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_feeManager\",\"outputs\":[{\"internalType\":\"contractIVerifierFeeManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"accessController\",\"type\":\"address\"}],\"name\":\"setAccessController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIVerifierFeeManager\",\"name\":\"feeManager\",\"type\":\"address\"}],\"name\":\"setFeeManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"currentConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newConfigDigest\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structCommon.AddressAndWeight[]\",\"name\":\"addressesAndWeights\",\"type\":\"tuple[]\"}],\"name\":\"setVerifier\",\"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\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"unsetVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"payloads\",\"type\":\"bytes[]\"}],\"name\":\"verifyBulk\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"verifiedReports\",\"type\":\"bytes[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
- Bin: "0x60806040523480156200001157600080fd5b5060405162001c6138038062001c61833981016040819052620000349162000193565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000e8565b5050600480546001600160a01b0319166001600160a01b03939093169290921790915550620001c5565b336001600160a01b03821603620001425760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001a657600080fd5b81516001600160a01b0381168114620001be57600080fd5b9392505050565b611a8c80620001d56000396000f3fe6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063b011b24711610059578063b011b2471461028e578063eeb7b248146102ae578063f08391d8146102f1578063f2fde38b1461031157600080fd5b80638da5cb5b146102235780638e760afe1461024e57806394ba28461461026157600080fd5b80636e914094116100bb5780636e914094146101ae57806379ba5097146101ce57806383490cd7146101e35780638c2a4d531461020357600080fd5b8063181f5a77146100e257806338416b5b1461013a578063472d35b91461018c575b600080fd5b3480156100ee57600080fd5b5060408051808201909152601381527f566572696669657250726f787920312e312e300000000000000000000000000060208201525b60405161013191906113b2565b60405180910390f35b34801561014657600080fd5b506005546101679073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610131565b34801561019857600080fd5b506101ac6101a73660046113ee565b610331565b005b3480156101ba57600080fd5b506101ac6101c936600461140b565b6105a9565b3480156101da57600080fd5b506101ac61069a565b6101f66101f1366004611424565b610797565b6040516101319190611499565b34801561020f57600080fd5b506101ac61021e3660046113ee565b6109f5565b34801561022f57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610167565b61012461025c366004611519565b610c26565b34801561026d57600080fd5b506004546101679073ffffffffffffffffffffffffffffffffffffffff1681565b34801561029a57600080fd5b506101ac6102a9366004611579565b610dda565b3480156102ba57600080fd5b506101676102c936600461140b565b60009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b3480156102fd57600080fd5b506101ac61030c3660046113ee565b611000565b34801561031d57600080fd5b506101ac61032c3660046113ee565b611087565b61033961109b565b73ffffffffffffffffffffffffffffffffffffffff8116610386576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff1387e1600000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610410573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043491906115fc565b15806104eb57506040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f40d7f78e00000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa1580156104c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e991906115fc565b155b15610522576040517f8238941900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f04628abcaa6b1674651352125cb94b65b289145bc2bc4d67720bb7d966372f0391015b60405180910390a15050565b6105b161109b565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610615576040517fb151802b000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b6000828152600360205260409081902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055517f11dc15c4b8ac2b183166cc8427e5385a5ece8308217a4217338c6a7614845c4c9061059d908490849091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60015473ffffffffffffffffffffffffffffffffffffffff16331461071b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161060c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60045460609073ffffffffffffffffffffffffffffffffffffffff16801580159061085757506040517f6b14daf800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690636b14daf8906108149033906000903690600401611667565b602060405180830381865afa158015610831573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085591906115fc565b155b1561088e576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055473ffffffffffffffffffffffffffffffffffffffff168015610938576040517f40d7f78e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216906340d7f78e90349061090590899089903390600401611697565b6000604051808303818588803b15801561091e57600080fd5b505af1158015610932573d6000803e3d6000fd5b50505050505b8367ffffffffffffffff8111156109515761095161178c565b60405190808252806020026020018201604052801561098457816020015b606081526020019060019003908161096f5790505b50925060005b848110156109ec576109be8686838181106109a7576109a76117bb565b90506020028101906109b991906117ea565b61111e565b8482815181106109d0576109d06117bb565b6020026020010181905250806109e590611856565b905061098a565b50505092915050565b6109fd61109b565b8073ffffffffffffffffffffffffffffffffffffffff8116610a4b576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f3d3ac1b500000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610ad5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af991906115fc565b610b2f576040517f75b0527a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205460ff1615610ba7576040517f4e01ccfd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240161060c565b73ffffffffffffffffffffffffffffffffffffffff821660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905590519182527f1f2cd7c97f4d801b5efe26cc409617c1fd6c5ef786e79aacb90af40923e4e8e9910161059d565b60045460609073ffffffffffffffffffffffffffffffffffffffff168015801590610ce657506040517f6b14daf800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690636b14daf890610ca39033906000903690600401611667565b602060405180830381865afa158015610cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce491906115fc565b155b15610d1d576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055473ffffffffffffffffffffffffffffffffffffffff168015610dc7576040517ff1387e1600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063f1387e16903490610d94908990899033906004016118b5565b6000604051808303818588803b158015610dad57600080fd5b505af1158015610dc1573d6000803e3d6000fd5b50505050505b610dd1858561111e565b95945050505050565b600083815260036020526040902054839073ffffffffffffffffffffffffffffffffffffffff168015610e58576040517f375d1fe60000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216602482015260440161060c565b3360009081526002602052604090205460ff16610ea1576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600085815260036020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790558215610fb95760055473ffffffffffffffffffffffffffffffffffffffff16610f2c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546040517ff65df96200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063f65df96290610f86908890889088906004016118ef565b600060405180830381600087803b158015610fa057600080fd5b505af1158015610fb4573d6000803e3d6000fd5b505050505b6040805187815260208101879052338183015290517fbeb513e532542a562ac35699e7cd9ae7d198dcd3eee15bada6c857d28ceaddcf9181900360600190a1505050505050565b61100861109b565b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f953e92b1a6442e9c3242531154a3f6f6eb00b4e9c719ba8118fa6235e4ce89b6910161059d565b61108f61109b565b6110988161124f565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461111c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161060c565b565b6060600061112c8385611978565b60008181526003602052604090205490915073ffffffffffffffffffffffffffffffffffffffff168061118e576040517fb151802b0000000000000000000000000000000000000000000000000000000081526004810183905260240161060c565b6040517f3d3ac1b500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690633d3ac1b5906111e4908890889033906004016118b5565b6000604051808303816000875af1158015611203573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610dd191908101906119b4565b92915050565b3373ffffffffffffffffffffffffffffffffffffffff8216036112ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161060c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60005b8381101561135f578181015183820152602001611347565b50506000910152565b60008151808452611380816020860160208601611344565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006113c56020830184611368565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461109857600080fd5b60006020828403121561140057600080fd5b81356113c5816113cc565b60006020828403121561141d57600080fd5b5035919050565b6000806020838503121561143757600080fd5b823567ffffffffffffffff8082111561144f57600080fd5b818501915085601f83011261146357600080fd5b81358181111561147257600080fd5b8660208260051b850101111561148757600080fd5b60209290920196919550909350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561150c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526114fa858351611368565b945092850192908501906001016114c0565b5092979650505050505050565b6000806020838503121561152c57600080fd5b823567ffffffffffffffff8082111561154457600080fd5b818501915085601f83011261155857600080fd5b81358181111561156757600080fd5b86602082850101111561148757600080fd5b6000806000806060858703121561158f57600080fd5b8435935060208501359250604085013567ffffffffffffffff808211156115b557600080fd5b818701915087601f8301126115c957600080fd5b8135818111156115d857600080fd5b8860208260061b85010111156115ed57600080fd5b95989497505060200194505050565b60006020828403121561160e57600080fd5b815180151581146113c557600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff84168152604060208201526000610dd160408301848661161e565b6040808252810183905260006060600585901b8301810190830186835b87811015611763577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa086850301835281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18a360301811261171557600080fd5b8901602081810191359067ffffffffffffffff82111561173457600080fd5b81360383131561174357600080fd5b61174e87838561161e565b965094850194939093019250506001016116b4565b50505073ffffffffffffffffffffffffffffffffffffffff841660208401529050949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261181f57600080fd5b83018035915067ffffffffffffffff82111561183a57600080fd5b60200191503681900382131561184f57600080fd5b9250929050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036118ae577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b6040815260006118c960408301858761161e565b905073ffffffffffffffffffffffffffffffffffffffff83166020830152949350505050565b838152604060208083018290528282018490526000919085906060850184805b88811015611969578435611922816113cc565b73ffffffffffffffffffffffffffffffffffffffff1683528484013567ffffffffffffffff8116808214611954578384fd5b8486015250938501939185019160010161190f565b50909998505050505050505050565b80356020831015611249577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b6000602082840312156119c657600080fd5b815167ffffffffffffffff808211156119de57600080fd5b818401915084601f8301126119f257600080fd5b815181811115611a0457611a0461178c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611a4a57611a4a61178c565b81604052828152876020848701011115611a6357600080fd5b611a74836020830160208801611344565b97965050505050505056fea164736f6c6343000810000a",
+ ABI: "[{\"inputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"accessController\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BadVerification\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"ConfigDigestAlreadySet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FeeManagerInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifier\",\"type\":\"address\"}],\"name\":\"VerifierAlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VerifierInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"VerifierNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessController\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessController\",\"type\":\"address\"}],\"name\":\"AccessControllerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldFeeManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newFeeManager\",\"type\":\"address\"}],\"name\":\"FeeManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"oldConfigDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"newConfigDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"VerifierUnset\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifierAddress\",\"type\":\"address\"}],\"name\":\"initializeVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_accessController\",\"outputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_feeManager\",\"outputs\":[{\"internalType\":\"contractIVerifierFeeManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"accessController\",\"type\":\"address\"}],\"name\":\"setAccessController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIVerifierFeeManager\",\"name\":\"feeManager\",\"type\":\"address\"}],\"name\":\"setFeeManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"currentConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newConfigDigest\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"weight\",\"type\":\"uint64\"}],\"internalType\":\"structCommon.AddressAndWeight[]\",\"name\":\"addressesAndWeights\",\"type\":\"tuple[]\"}],\"name\":\"setVerifier\",\"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\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"unsetVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"parameterPayload\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"payloads\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"parameterPayload\",\"type\":\"bytes\"}],\"name\":\"verifyBulk\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"verifiedReports\",\"type\":\"bytes[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
+ Bin: "0x60806040523480156200001157600080fd5b5060405162001d3638038062001d36833981016040819052620000349162000193565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000e8565b5050600480546001600160a01b0319166001600160a01b03939093169290921790915550620001c5565b336001600160a01b03821603620001425760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001a657600080fd5b81516001600160a01b0381168114620001be57600080fd5b9392505050565b611b6180620001d56000396000f3fe6080604052600436106100dd5760003560e01c806394ba28461161007f578063f08391d811610059578063f08391d8146102be578063f2fde38b146102de578063f7e83aee146102fe578063f873a61c1461031157600080fd5b806394ba28461461022e578063b011b2471461025b578063eeb7b2481461027b57600080fd5b80636e914094116100bb5780636e914094146101ae57806379ba5097146101ce5780638c2a4d53146101e35780638da5cb5b1461020357600080fd5b8063181f5a77146100e257806338416b5b1461013a578063472d35b91461018c575b600080fd5b3480156100ee57600080fd5b5060408051808201909152601381527f566572696669657250726f787920312e312e300000000000000000000000000060208201525b60405161013191906113c3565b60405180910390f35b34801561014657600080fd5b506005546101679073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610131565b34801561019857600080fd5b506101ac6101a73660046113ff565b610331565b005b3480156101ba57600080fd5b506101ac6101c936600461141c565b6105a9565b3480156101da57600080fd5b506101ac61069a565b3480156101ef57600080fd5b506101ac6101fe3660046113ff565b610797565b34801561020f57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610167565b34801561023a57600080fd5b506004546101679073ffffffffffffffffffffffffffffffffffffffff1681565b34801561026757600080fd5b506101ac610276366004611435565b6109c8565b34801561028757600080fd5b5061016761029636600461141c565b60009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b3480156102ca57600080fd5b506101ac6102d93660046113ff565b610bee565b3480156102ea57600080fd5b506101ac6102f93660046113ff565b610c75565b61012461030c366004611501565b610c89565b61032461031f36600461156d565b610e43565b60405161013191906115ee565b6103396110a7565b73ffffffffffffffffffffffffffffffffffffffff8116610386576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fdba45fe000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610410573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610434919061166e565b15806104eb57506040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f6c2f1a1700000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa1580156104c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e9919061166e565b155b15610522576040517f8238941900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f04628abcaa6b1674651352125cb94b65b289145bc2bc4d67720bb7d966372f0391015b60405180910390a15050565b6105b16110a7565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610615576040517fb151802b000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b6000828152600360205260409081902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055517f11dc15c4b8ac2b183166cc8427e5385a5ece8308217a4217338c6a7614845c4c9061059d908490849091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60015473ffffffffffffffffffffffffffffffffffffffff16331461071b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161060c565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61079f6110a7565b8073ffffffffffffffffffffffffffffffffffffffff81166107ed576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f3d3ac1b500000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b919061166e565b6108d1576040517f75b0527a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205460ff1615610949576040517f4e01ccfd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240161060c565b73ffffffffffffffffffffffffffffffffffffffff821660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905590519182527f1f2cd7c97f4d801b5efe26cc409617c1fd6c5ef786e79aacb90af40923e4e8e9910161059d565b600083815260036020526040902054839073ffffffffffffffffffffffffffffffffffffffff168015610a46576040517f375d1fe60000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8216602482015260440161060c565b3360009081526002602052604090205460ff16610a8f576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600085815260036020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790558215610ba75760055473ffffffffffffffffffffffffffffffffffffffff16610b1a576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546040517ff65df96200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063f65df96290610b7490889088908890600401611690565b600060405180830381600087803b158015610b8e57600080fd5b505af1158015610ba2573d6000803e3d6000fd5b505050505b6040805187815260208101879052338183015290517fbeb513e532542a562ac35699e7cd9ae7d198dcd3eee15bada6c857d28ceaddcf9181900360600190a1505050505050565b610bf66110a7565b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f953e92b1a6442e9c3242531154a3f6f6eb00b4e9c719ba8118fa6235e4ce89b6910161059d565b610c7d6110a7565b610c868161112a565b50565b60045460609073ffffffffffffffffffffffffffffffffffffffff168015801590610d4957506040517f6b14daf800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690636b14daf890610d069033906000903690600401611762565b602060405180830381865afa158015610d23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d47919061166e565b155b15610d80576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055473ffffffffffffffffffffffffffffffffffffffff168015610e2e576040517fdba45fe000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063dba45fe0903490610dfb908b908b908b908b90339060040161179b565b6000604051808303818588803b158015610e1457600080fd5b505af1158015610e28573d6000803e3d6000fd5b50505050505b610e38878761121f565b979650505050505050565b60045460609073ffffffffffffffffffffffffffffffffffffffff168015801590610f0357506040517f6b14daf800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690636b14daf890610ec09033906000903690600401611762565b602060405180830381865afa158015610edd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f01919061166e565b155b15610f3a576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055473ffffffffffffffffffffffffffffffffffffffff168015610fe8576040517f6c2f1a1700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690636c2f1a17903490610fb5908b908b908b908b9033906004016117eb565b6000604051808303818588803b158015610fce57600080fd5b505af1158015610fe2573d6000803e3d6000fd5b50505050505b8567ffffffffffffffff811115611001576110016118fc565b60405190808252806020026020018201604052801561103457816020015b606081526020019060019003908161101f5790505b50925060005b8681101561109c5761106e8888838181106110575761105761192b565b9050602002810190611069919061195a565b61121f565b8482815181106110805761108061192b565b602002602001018190525080611095906119bf565b905061103a565b505050949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611128576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161060c565b565b3373ffffffffffffffffffffffffffffffffffffffff8216036111a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161060c565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6060600061122d8385611a1e565b60008181526003602052604090205490915073ffffffffffffffffffffffffffffffffffffffff168061128f576040517fb151802b0000000000000000000000000000000000000000000000000000000081526004810183905260240161060c565b6040517f3d3ac1b500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690633d3ac1b5906112e590889088903390600401611a5a565b6000604051808303816000875af1158015611304573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261134a9190810190611a94565b925050505b92915050565b60005b83811015611370578181015183820152602001611358565b50506000910152565b60008151808452611391816020860160208601611355565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006113d66020830184611379565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c8657600080fd5b60006020828403121561141157600080fd5b81356113d6816113dd565b60006020828403121561142e57600080fd5b5035919050565b6000806000806060858703121561144b57600080fd5b8435935060208501359250604085013567ffffffffffffffff8082111561147157600080fd5b818701915087601f83011261148557600080fd5b81358181111561149457600080fd5b8860208260061b85010111156114a957600080fd5b95989497505060200194505050565b60008083601f8401126114ca57600080fd5b50813567ffffffffffffffff8111156114e257600080fd5b6020830191508360208285010111156114fa57600080fd5b9250929050565b6000806000806040858703121561151757600080fd5b843567ffffffffffffffff8082111561152f57600080fd5b61153b888389016114b8565b9096509450602087013591508082111561155457600080fd5b50611561878288016114b8565b95989497509550505050565b6000806000806040858703121561158357600080fd5b843567ffffffffffffffff8082111561159b57600080fd5b818701915087601f8301126115af57600080fd5b8135818111156115be57600080fd5b8860208260051b85010111156115d357600080fd5b60209283019650945090860135908082111561155457600080fd5b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611661577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261164f858351611379565b94509285019290850190600101611615565b5092979650505050505050565b60006020828403121561168057600080fd5b815180151581146113d657600080fd5b838152604060208083018290528282018490526000919085906060850184805b8881101561170a5784356116c3816113dd565b73ffffffffffffffffffffffffffffffffffffffff1683528484013567ffffffffffffffff81168082146116f5578384fd5b848601525093850193918501916001016116b0565b50909998505050505050505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff84168152604060208201526000611792604083018486611719565b95945050505050565b6060815260006117af606083018789611719565b82810360208401526117c2818688611719565b91505073ffffffffffffffffffffffffffffffffffffffff831660408301529695505050505050565b6060808252810185905260006080600587901b8301810190830188835b898110156118b7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8086850301835281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18c360301811261186957600080fd5b8b01602081810191359067ffffffffffffffff82111561188857600080fd5b81360383131561189757600080fd5b6118a2878385611719565b96509485019493909301925050600101611808565b50505082810360208401526118cd818688611719565b9150506118f2604083018473ffffffffffffffffffffffffffffffffffffffff169052565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261198f57600080fd5b83018035915067ffffffffffffffff8211156119aa57600080fd5b6020019150368190038213156114fa57600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611a17577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b8035602083101561134f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b604081526000611a6e604083018587611719565b905073ffffffffffffffffffffffffffffffffffffffff83166020830152949350505050565b600060208284031215611aa657600080fd5b815167ffffffffffffffff80821115611abe57600080fd5b818401915084601f830112611ad257600080fd5b815181811115611ae457611ae46118fc565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611b2a57611b2a6118fc565b81604052828152876020848701011115611b4357600080fd5b610e3883602083016020880161135556fea164736f6c6343000810000a",
}
var LLOVerifierProxyABI = LLOVerifierProxyMetaData.ABI
@@ -370,28 +370,28 @@ func (_LLOVerifierProxy *LLOVerifierProxyTransactorSession) UnsetVerifier(config
return _LLOVerifierProxy.Contract.UnsetVerifier(&_LLOVerifierProxy.TransactOpts, configDigest)
}
-func (_LLOVerifierProxy *LLOVerifierProxyTransactor) Verify(opts *bind.TransactOpts, payload []byte) (*types.Transaction, error) {
- return _LLOVerifierProxy.contract.Transact(opts, "verify", payload)
+func (_LLOVerifierProxy *LLOVerifierProxyTransactor) Verify(opts *bind.TransactOpts, payload []byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _LLOVerifierProxy.contract.Transact(opts, "verify", payload, parameterPayload)
}
-func (_LLOVerifierProxy *LLOVerifierProxySession) Verify(payload []byte) (*types.Transaction, error) {
- return _LLOVerifierProxy.Contract.Verify(&_LLOVerifierProxy.TransactOpts, payload)
+func (_LLOVerifierProxy *LLOVerifierProxySession) Verify(payload []byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _LLOVerifierProxy.Contract.Verify(&_LLOVerifierProxy.TransactOpts, payload, parameterPayload)
}
-func (_LLOVerifierProxy *LLOVerifierProxyTransactorSession) Verify(payload []byte) (*types.Transaction, error) {
- return _LLOVerifierProxy.Contract.Verify(&_LLOVerifierProxy.TransactOpts, payload)
+func (_LLOVerifierProxy *LLOVerifierProxyTransactorSession) Verify(payload []byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _LLOVerifierProxy.Contract.Verify(&_LLOVerifierProxy.TransactOpts, payload, parameterPayload)
}
-func (_LLOVerifierProxy *LLOVerifierProxyTransactor) VerifyBulk(opts *bind.TransactOpts, payloads [][]byte) (*types.Transaction, error) {
- return _LLOVerifierProxy.contract.Transact(opts, "verifyBulk", payloads)
+func (_LLOVerifierProxy *LLOVerifierProxyTransactor) VerifyBulk(opts *bind.TransactOpts, payloads [][]byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _LLOVerifierProxy.contract.Transact(opts, "verifyBulk", payloads, parameterPayload)
}
-func (_LLOVerifierProxy *LLOVerifierProxySession) VerifyBulk(payloads [][]byte) (*types.Transaction, error) {
- return _LLOVerifierProxy.Contract.VerifyBulk(&_LLOVerifierProxy.TransactOpts, payloads)
+func (_LLOVerifierProxy *LLOVerifierProxySession) VerifyBulk(payloads [][]byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _LLOVerifierProxy.Contract.VerifyBulk(&_LLOVerifierProxy.TransactOpts, payloads, parameterPayload)
}
-func (_LLOVerifierProxy *LLOVerifierProxyTransactorSession) VerifyBulk(payloads [][]byte) (*types.Transaction, error) {
- return _LLOVerifierProxy.Contract.VerifyBulk(&_LLOVerifierProxy.TransactOpts, payloads)
+func (_LLOVerifierProxy *LLOVerifierProxyTransactorSession) VerifyBulk(payloads [][]byte, parameterPayload []byte) (*types.Transaction, error) {
+ return _LLOVerifierProxy.Contract.VerifyBulk(&_LLOVerifierProxy.TransactOpts, payloads, parameterPayload)
}
type LLOVerifierProxyAccessControllerSetIterator struct {
@@ -1335,9 +1335,9 @@ type LLOVerifierProxyInterface interface {
UnsetVerifier(opts *bind.TransactOpts, configDigest [32]byte) (*types.Transaction, error)
- Verify(opts *bind.TransactOpts, payload []byte) (*types.Transaction, error)
+ Verify(opts *bind.TransactOpts, payload []byte, parameterPayload []byte) (*types.Transaction, error)
- VerifyBulk(opts *bind.TransactOpts, payloads [][]byte) (*types.Transaction, error)
+ VerifyBulk(opts *bind.TransactOpts, payloads [][]byte, parameterPayload []byte) (*types.Transaction, error)
FilterAccessControllerSet(opts *bind.FilterOpts) (*LLOVerifierProxyAccessControllerSetIterator, error)
diff --git a/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt
index b8d71099c7..4adf47a26a 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
@@ -40,7 +40,7 @@ keeper_registry_wrapper1_3: ../../contracts/solc/v0.8.6/KeeperRegistry1_3.abi ..
keeper_registry_wrapper2_0: ../../contracts/solc/v0.8.6/KeeperRegistry2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistry2_0.bin c32dea7d5ef66b7c58ddc84ddf69aa44df1b3ae8601fbc271c95be4ff5853056
keeper_registry_wrapper_2_1: ../../contracts/solc/v0.8.16/KeeperRegistry2_1.abi ../../contracts/solc/v0.8.16/KeeperRegistry2_1.bin 604e4a0cd980c713929b523b999462a3aa0ed06f96ff563a4c8566cf59c8445b
keepers_vrf_consumer: ../../contracts/solc/v0.8.6/KeepersVRFConsumer.abi ../../contracts/solc/v0.8.6/KeepersVRFConsumer.bin fa75572e689c9e84705c63e8dbe1b7b8aa1a8fe82d66356c4873d024bb9166e8
-llo_feeds: ../../contracts/solc/v0.8.16/VerifierProxy.abi ../../contracts/solc/v0.8.16/VerifierProxy.bin 92ad0416e999e9d55e4f00a8b7df616bb69ae27ce52994a6061598e95364d2cc
+llo_feeds: ../../contracts/solc/v0.8.16/VerifierProxy.abi ../../contracts/solc/v0.8.16/VerifierProxy.bin 250e4066936535d57d8e3859dfd33fddc7abc525b0f81e1fe87d96f00663a74f
llo_feeds_test: ../../contracts/solc/v0.8.16/ExposedVerifier.abi ../../contracts/solc/v0.8.16/ExposedVerifier.bin 6932cea8f2738e874d3ec9e1a4231d2421704030c071d9e15dd2f7f08482c246
log_emitter: ../../contracts/solc/v0.8.19/LogEmitter.abi ../../contracts/solc/v0.8.19/LogEmitter.bin 244ba13730c036de0b02beef4e3d9c9a96946ce353c27f366baecc7f5be5a6fd
log_triggered_feed_lookup_wrapper: ../../contracts/solc/v0.8.16/LogTriggeredStreamsLookup.abi ../../contracts/solc/v0.8.16/LogTriggeredStreamsLookup.bin b3c01ce82842c6be4aceba218c78c1e4958803eab3abe5b0cdbe6fb0464c4a5a