From 22cab6c1526371c898bde52e7836cfd01ba7daf5 Mon Sep 17 00:00:00 2001 From: Nick Corin Date: Mon, 17 Jun 2024 16:10:41 +0200 Subject: [PATCH 01/14] go.mod: Bumped chainlink-common to commit 1fb0b48758af25d689b6957ebfb76598c9fb27ea (#13554) * go.mod: Bumped chainlink-common to commit 1fb0b48758af25d689b6957ebfb76598c9fb27ea * changeset: Fix format * changeset: Fix format * mocks: Re-generate chainwriter mocks * go.mod: Bumped chainlink-common to commit 1fb0b48758af25d689b6957ebfb76598c9fb27ea --- .changeset/fair-buttons-judge.md | 5 +++++ core/capabilities/targets/mocks/chain_writer.go | 4 ++-- core/capabilities/targets/write_target.go | 2 +- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- core/services/relay/evm/chain_writer.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- integration-tests/go.mod | 4 ++-- integration-tests/go.sum | 8 ++++---- integration-tests/load/go.mod | 4 ++-- integration-tests/load/go.sum | 8 ++++---- 12 files changed, 27 insertions(+), 22 deletions(-) create mode 100644 .changeset/fair-buttons-judge.md diff --git a/.changeset/fair-buttons-judge.md b/.changeset/fair-buttons-judge.md new file mode 100644 index 00000000000..7aacd89787a --- /dev/null +++ b/.changeset/fair-buttons-judge.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal Bumped `chainlink-common` package version to commit `1fb0b48758af25d689b6957ebfb76598c9fb27ea`. diff --git a/core/capabilities/targets/mocks/chain_writer.go b/core/capabilities/targets/mocks/chain_writer.go index d8a5a677a11..408c83ca534 100644 --- a/core/capabilities/targets/mocks/chain_writer.go +++ b/core/capabilities/targets/mocks/chain_writer.go @@ -77,7 +77,7 @@ func (_m *ChainWriter) GetTransactionStatus(ctx context.Context, transactionID u } // SubmitTransaction provides a mock function with given fields: ctx, contractName, method, args, transactionID, toAddress, meta, value -func (_m *ChainWriter) SubmitTransaction(ctx context.Context, contractName string, method string, args interface{}, transactionID uuid.UUID, toAddress string, meta *types.TxMeta, value big.Int) error { +func (_m *ChainWriter) SubmitTransaction(ctx context.Context, contractName string, method string, args interface{}, transactionID string, toAddress string, meta *types.TxMeta, value *big.Int) error { ret := _m.Called(ctx, contractName, method, args, transactionID, toAddress, meta, value) if len(ret) == 0 { @@ -85,7 +85,7 @@ func (_m *ChainWriter) SubmitTransaction(ctx context.Context, contractName strin } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, interface{}, uuid.UUID, string, *types.TxMeta, big.Int) error); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, interface{}, string, string, *types.TxMeta, *big.Int) error); ok { r0 = rf(ctx, contractName, method, args, transactionID, toAddress, meta, value) } else { r0 = ret.Error(0) diff --git a/core/capabilities/targets/write_target.go b/core/capabilities/targets/write_target.go index 02f95ed6a08..de65cb85199 100644 --- a/core/capabilities/targets/write_target.go +++ b/core/capabilities/targets/write_target.go @@ -151,7 +151,7 @@ func (cap *WriteTarget) Execute(ctx context.Context, request capabilities.Capabi meta := commontypes.TxMeta{WorkflowExecutionID: &request.Metadata.WorkflowExecutionID} value := big.NewInt(0) - if err := cap.cw.SubmitTransaction(ctx, "forwarder", "report", req, txID, cap.forwarderAddress, &meta, *value); err != nil { + if err := cap.cw.SubmitTransaction(ctx, "forwarder", "report", req, txID.String(), cap.forwarderAddress, &meta, value); err != nil { return nil, err } cap.lggr.Debugw("Transaction submitted", "request", request, "transaction", txID) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index a4c4744da88..48a21fc7129 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -24,7 +24,7 @@ require ( github.com/prometheus/client_golang v1.17.0 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 4c1230e1f41..8b84e304b2b 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1212,8 +1212,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458 h1:+7LQmbMNaLXej+0ajbTxUfTt4w/ILODpmrOETQ5rTCI= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af h1:YVw8iLZJEj9cJQGX1wggB9Lv1liMnudGvR1eC3CsWrg= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= diff --git a/core/services/relay/evm/chain_writer.go b/core/services/relay/evm/chain_writer.go index 52bea212b51..12c2f2d35f5 100644 --- a/core/services/relay/evm/chain_writer.go +++ b/core/services/relay/evm/chain_writer.go @@ -86,7 +86,7 @@ type chainWriter struct { // Note: The codec that ChainWriter uses to encode the parameters for the contract ABI cannot handle // `nil` values, including for slices. Until the bug is fixed we need to ensure that there are no // `nil` values passed in the request. -func (w *chainWriter) SubmitTransaction(ctx context.Context, contract, method string, args any, transactionID uuid.UUID, toAddress string, meta *commontypes.TxMeta, value big.Int) error { +func (w *chainWriter) SubmitTransaction(ctx context.Context, contract, method string, args any, transactionID string, toAddress string, meta *commontypes.TxMeta, value *big.Int) error { if !common.IsHexAddress(toAddress) { return fmt.Errorf("toAddress is not a valid ethereum address: %v", toAddress) } diff --git a/go.mod b/go.mod index 0ddf7caf26d..949a999afc4 100644 --- a/go.mod +++ b/go.mod @@ -72,7 +72,7 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chain-selectors v1.0.10 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 diff --git a/go.sum b/go.sum index e9dc9d81303..9a87f856d1c 100644 --- a/go.sum +++ b/go.sum @@ -1171,8 +1171,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458 h1:+7LQmbMNaLXej+0ajbTxUfTt4w/ILODpmrOETQ5rTCI= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af h1:YVw8iLZJEj9cJQGX1wggB9Lv1liMnudGvR1eC3CsWrg= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index f0991c1f715..1265e54dc16 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -27,8 +27,8 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458 - github.com/smartcontractkit/chainlink-testing-framework v1.30.5 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af + github.com/smartcontractkit/chainlink-testing-framework v1.30.4 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 016fca4c4a9..fc0614fdb9e 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1512,8 +1512,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458 h1:+7LQmbMNaLXej+0ajbTxUfTt4w/ILODpmrOETQ5rTCI= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af h1:YVw8iLZJEj9cJQGX1wggB9Lv1liMnudGvR1eC3CsWrg= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= @@ -1524,8 +1524,8 @@ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 h1:h1E87+z+JcUEfvbJVF56SnZA/YUFE5ewUE61MaR/Ewg= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= -github.com/smartcontractkit/chainlink-testing-framework v1.30.5 h1:RBeQkaUH095L/hOH6JbfScAo4jkI0osBp8kgULnGwos= -github.com/smartcontractkit/chainlink-testing-framework v1.30.5/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= +github.com/smartcontractkit/chainlink-testing-framework v1.30.4 h1:kf6zRL6v5D047gynYNNqXGl9QBvnQSa4LMs1iHLRu64= +github.com/smartcontractkit/chainlink-testing-framework v1.30.4/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449 h1:fX/xmGm1GBsD1ZZnooNT+eWA0hiTAqFlHzOC5CY4dy8= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 7fb29e4060b..1f102b9cc2c 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -16,8 +16,8 @@ require ( github.com/rs/zerolog v1.30.0 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458 - github.com/smartcontractkit/chainlink-testing-framework v1.30.5 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af + github.com/smartcontractkit/chainlink-testing-framework v1.30.4 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240214231432-4ad5eb95178c github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240216210048-da02459ddad8 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 5dd5443f52f..3522cd16d2e 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1502,8 +1502,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458 h1:+7LQmbMNaLXej+0ajbTxUfTt4w/ILODpmrOETQ5rTCI= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614120734-7fa0ab584458/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af h1:YVw8iLZJEj9cJQGX1wggB9Lv1liMnudGvR1eC3CsWrg= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= @@ -1514,8 +1514,8 @@ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 h1:h1E87+z+JcUEfvbJVF56SnZA/YUFE5ewUE61MaR/Ewg= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= -github.com/smartcontractkit/chainlink-testing-framework v1.30.5 h1:RBeQkaUH095L/hOH6JbfScAo4jkI0osBp8kgULnGwos= -github.com/smartcontractkit/chainlink-testing-framework v1.30.5/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= +github.com/smartcontractkit/chainlink-testing-framework v1.30.4 h1:kf6zRL6v5D047gynYNNqXGl9QBvnQSa4LMs1iHLRu64= +github.com/smartcontractkit/chainlink-testing-framework v1.30.4/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449 h1:fX/xmGm1GBsD1ZZnooNT+eWA0hiTAqFlHzOC5CY4dy8= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= From f1d478d8bbba92f9753f7a1d6733ba4efd1f616a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deividas=20Kar=C5=BEinauskas?= Date: Mon, 17 Jun 2024 18:40:50 +0300 Subject: [PATCH 02/14] CapabilitiyRegistry: Restrict nodes to a single Workflow DON (#13566) * Minor gas saving refactor * Minor gas saving refactor #2 * Split DON IDs into capabilities and workflow * Validate that a node can belong to a single Workflow DON * Update gas snapshot and wrappers * Align error messages * Changesets * NodeInfo => NodeParams * Add NodeInfo * Update gas snapshot and wrappers * Update reader integration test * Fix Reader test * Simplify changes * Comment fix --- .changeset/curly-crabs-doubt.md | 5 + contracts/.changeset/red-wasps-behave.md | 5 + contracts/gas-snapshots/keystone.gas-snapshot | 77 +++++------ .../src/v0.8/keystone/CapabilityRegistry.sol | 127 ++++++++++++------ .../src/v0.8/keystone/KeystoneForwarder.sol | 2 +- .../test/CapabilityRegistry_AddDONTest.t.sol | 26 +++- .../CapabilityRegistry_AddNodesTest.t.sol | 52 +++---- .../test/CapabilityRegistry_GetDONsTest.t.sol | 6 +- .../CapabilityRegistry_GetNodesTest.t.sol | 16 +-- .../CapabilityRegistry_RemoveDONsTest.t.sol | 6 +- .../CapabilityRegistry_RemoveNodesTest.t.sol | 44 +++--- .../CapabilityRegistry_UpdateDONTest.t.sol | 8 +- .../CapabilityRegistry_UpdateNodesTest.t.sol | 60 ++++----- core/capabilities/reader.go | 4 +- core/capabilities/reader_test.go | 53 +++++++- .../keystone_capability_registry.go | 71 +++++----- ...rapper-dependency-versions-do-not-edit.txt | 2 +- 17 files changed, 338 insertions(+), 226 deletions(-) create mode 100644 .changeset/curly-crabs-doubt.md create mode 100644 contracts/.changeset/red-wasps-behave.md diff --git a/.changeset/curly-crabs-doubt.md b/.changeset/curly-crabs-doubt.md new file mode 100644 index 00000000000..0408383bd03 --- /dev/null +++ b/.changeset/curly-crabs-doubt.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal diff --git a/contracts/.changeset/red-wasps-behave.md b/contracts/.changeset/red-wasps-behave.md new file mode 100644 index 00000000000..93fba83b558 --- /dev/null +++ b/contracts/.changeset/red-wasps-behave.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +#internal diff --git a/contracts/gas-snapshots/keystone.gas-snapshot b/contracts/gas-snapshots/keystone.gas-snapshot index 60af8a141a3..f641bcb065e 100644 --- a/contracts/gas-snapshots/keystone.gas-snapshot +++ b/contracts/gas-snapshots/keystone.gas-snapshot @@ -4,27 +4,28 @@ CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 145769) CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 94606) CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 92961) -CapabilityRegistry_AddDONTest:test_AddDON() (gas: 499005) -CapabilityRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19247) -CapabilityRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 291948) -CapabilityRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 365161) -CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 375975) -CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 177964) -CapabilityRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43332) -CapabilityRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 306409) +CapabilityRegistry_AddDONTest:test_AddDON() (gas: 372909) +CapabilityRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19269) +CapabilityRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 169874) +CapabilityRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 243042) +CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 249901) +CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 116949) +CapabilityRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43354) +CapabilityRegistry_AddDONTest:test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() (gas: 344231) +CapabilityRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 180335) CapabilityRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 184333) CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17602) CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 18498) -CapabilityRegistry_AddNodesTest:test_AddsNodeInfo() (gas: 355400) -CapabilityRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 355388) +CapabilityRegistry_AddNodesTest:test_AddsNodeParams() (gas: 358667) +CapabilityRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 358633) CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301350) CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55207) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24940) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24895) CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27702) CapabilityRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25108) CapabilityRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27408) CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27047) -CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309778) +CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309800) CapabilityRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 92938) CapabilityRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 93066) CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 22944) @@ -33,51 +34,51 @@ CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDepreca CapabilityRegistry_GetCapabilitiesTest:test_ExcludesDeprecatedCapabilities() (gas: 122114) CapabilityRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 58311) CapabilityRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65746) -CapabilityRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 88461) +CapabilityRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 65329) CapabilityRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 11428) CapabilityRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 13087) CapabilityRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 36653) CapabilityRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 38938) -CapabilityRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 59861) -CapabilityRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 71597) -CapabilityRegistry_RemoveDONsTest:test_RemovesDON() (gas: 60669) +CapabilityRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 65482) +CapabilityRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73664) +CapabilityRegistry_RemoveDONsTest:test_RemovesDON() (gas: 54946) CapabilityRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15647) -CapabilityRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16518) +CapabilityRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16550) CapabilityRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 36122) CapabilityRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15816) -CapabilityRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 114054) -CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 371555) -CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 712587) -CapabilityRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 72342) -CapabilityRegistry_RemoveNodesTest:test_RemovesNode() (gas: 74176) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 24916) +CapabilityRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 115436) +CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 288312) +CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 562061) +CapabilityRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 73457) +CapabilityRegistry_RemoveNodesTest:test_RemovesNode() (gas: 75292) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25053) CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18418) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfDON() (gas: 385167) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18430) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfCapabilitiesDON() (gas: 385680) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18408) CapabilityRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 9796) CapabilityRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19411) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 157904) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 153162) CapabilityRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17831) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 231117) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 241977) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 103722) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 172410) -CapabilityRegistry_UpdateDONTest:test_UpdatesDON() (gas: 433641) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 226375) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 233235) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 107828) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 163668) +CapabilityRegistry_UpdateDONTest:test_UpdatesDON() (gas: 372699) CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 20627) CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 20048) CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 19786) CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 15426) CapabilityRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 36991) -CapabilityRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 250659) -CapabilityRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 158814) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35963) +CapabilityRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 253325) +CapabilityRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 161746) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35794) CapabilityRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25064) CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27303) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29184) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29214) CapabilityRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27291) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 26974) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25538) -CapabilityRegistry_UpdateNodesTest:test_UpdatesNodeInfo() (gas: 158803) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 26951) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25508) +CapabilityRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 161800) KeystoneForwarder_ReportTest:test_Report_ConfigVersion() (gas: 1802140) KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverInterfaceNotSupported() (gas: 126020) KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverNotContract() (gas: 127513) diff --git a/contracts/src/v0.8/keystone/CapabilityRegistry.sol b/contracts/src/v0.8/keystone/CapabilityRegistry.sol index 9b59439e1b0..c6802608204 100644 --- a/contracts/src/v0.8/keystone/CapabilityRegistry.sol +++ b/contracts/src/v0.8/keystone/CapabilityRegistry.sol @@ -31,9 +31,27 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { string name; } + struct NodeParams { + /// @notice The id of the node operator that manages this node + uint32 nodeOperatorId; + /// @notice The signer address for application-layer message verification. + bytes32 signer; + /// @notice This is an Ed25519 public key that is used to identify a node. + /// This key is guaranteed to be unique in the CapabilityRegistry. It is + /// used to identify a node in the the P2P network. + bytes32 p2pId; + /// @notice The list of hashed capability IDs supported by the node + bytes32[] hashedCapabilityIds; + } + struct NodeInfo { /// @notice The id of the node operator that manages this node uint32 nodeOperatorId; + /// @notice The number of times the node's configuration has been updated + uint32 configCount; + /// @notice The ID of the Workflow DON that the node belongs to. A node can + /// only belong to one DON that accepts Workflows. + uint32 workflowDONId; /// @notice The signer address for application-layer message verification. bytes32 signer; /// @notice This is an Ed25519 public key that is used to identify a node. @@ -42,6 +60,10 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { bytes32 p2pId; /// @notice The list of hashed capability IDs supported by the node bytes32[] hashedCapabilityIds; + /// @notice The list of capabilities DON Ids supported by the node. A node + /// can belong to multiple capabilities DONs. This list does not include a + /// Workflow DON id if the node belongs to one. + uint256[] capabilitiesDONIds; } struct Node { @@ -50,6 +72,9 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { uint32 nodeOperatorId; /// @notice The number of times the node's configuration has been updated uint32 configCount; + /// @notice The ID of the Workflow DON that the node belongs to. A node can + /// only belong to one DON that accepts Workflows. + uint32 workflowDONId; /// @notice The signer address for application-layer message verification. /// @dev This key is guaranteed to be unique in the CapabilityRegistry /// as a signer address can only belong to one node. @@ -67,8 +92,10 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// new capabilities by incrementing the configCount and creating a /// new set of supported capability IDs mapping(uint32 configCount => EnumerableSet.Bytes32Set capabilityId) supportedHashedCapabilityIds; - /// @notice The list of DON Ids supported by the node. - EnumerableSet.UintSet supportedDONIds; + /// @notice The list of capabilities DON Ids supported by the node. A node + /// can belong to multiple capabilities DONs. This list does not include a + /// Workflow DON id if the node belongs to one. + EnumerableSet.UintSet capabilitiesDONIds; } /// @notice CapabilityResponseType indicates whether remote response requires @@ -163,7 +190,9 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice True if the DON is public. A public DON means that it accepts /// external capability requests bool isPublic; - /// @notice True if the DON accepts Workflows. + /// @notice True if the DON accepts Workflows. A DON that accepts Workflows + /// is called Workflow DON and it can process Workflow Specs. A Workflow + /// DON also support one or more capabilities as well. bool acceptsWorkflows; /// @notice Mapping of config counts to configurations mapping(uint32 configCount => DONCapabilityConfig donConfig) config; @@ -287,9 +316,17 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { error NodeOperatorDoesNotExist(uint32 nodeOperatorId); /// @notice This error is thrown when trying to remove a node that is still - /// part of a DON + /// part of a capabitlities DON + /// @param donId The Id of the DON the node belongs to /// @param nodeP2PId The P2P Id of the node being removed - error NodePartOfDON(bytes32 nodeP2PId); + error NodePartOfCapabilitiesDON(uint32 donId, bytes32 nodeP2PId); + + /// @notice This error is thrown when attempting to add a node to a second + /// Workflow DON or when trying to remove a node that belongs to a Workflow + /// DON + /// @param donId The Id of the DON the node belongs to + /// @param nodeP2PId The P2P Id of the node + error NodePartOfWorkflowDON(uint32 donId, bytes32 nodeP2PId); /// @notice This error is thrown when trying to add a capability with a /// configuration contract that does not implement the required interface. @@ -469,10 +506,10 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice Adds nodes. Nodes can be added with deprecated capabilities to /// avoid breaking changes when deprecating capabilities. /// @param nodes The nodes to add - function addNodes(NodeInfo[] calldata nodes) external { + function addNodes(NodeParams[] calldata nodes) external { bool isOwner = msg.sender == owner(); for (uint256 i; i < nodes.length; ++i) { - NodeInfo memory node = nodes[i]; + NodeParams memory node = nodes[i]; NodeOperator memory nodeOperator = s_nodeOperators[node.nodeOperatorId]; if (nodeOperator.admin == address(0)) revert NodeOperatorDoesNotExist(node.nodeOperatorId); @@ -515,7 +552,9 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { Node storage node = s_nodes[p2pId]; if (node.signer == bytes32("")) revert NodeDoesNotExist(p2pId); - if (node.supportedDONIds.length() > 0) revert NodePartOfDON(p2pId); + if (node.capabilitiesDONIds.length() > 0) + revert NodePartOfCapabilitiesDON(uint32(node.capabilitiesDONIds.at(i)), p2pId); + if (node.workflowDONId != 0) revert NodePartOfWorkflowDON(node.workflowDONId, p2pId); if (!isOwner && msg.sender != s_nodeOperators[node.nodeOperatorId].admin) revert AccessForbidden(msg.sender); s_nodeSigners.remove(node.signer); @@ -528,10 +567,10 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice Updates nodes. The node admin can update the node's signer address /// and reconfigure its supported capabilities /// @param nodes The nodes to update - function updateNodes(NodeInfo[] calldata nodes) external { + function updateNodes(NodeParams[] calldata nodes) external { bool isOwner = msg.sender == owner(); for (uint256 i; i < nodes.length; ++i) { - NodeInfo memory node = nodes[i]; + NodeParams memory node = nodes[i]; NodeOperator memory nodeOperator = s_nodeOperators[node.nodeOperatorId]; if (!isOwner && msg.sender != nodeOperator.admin) revert AccessForbidden(msg.sender); @@ -539,14 +578,20 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { Node storage storedNode = s_nodes[node.p2pId]; if (storedNode.signer == bytes32("")) revert NodeDoesNotExist(node.p2pId); - if (node.signer == bytes32("") || (storedNode.signer != node.signer && s_nodeSigners.contains(node.signer))) - revert InvalidNodeSigner(); + if (node.signer == bytes32("")) revert InvalidNodeSigner(); + + bytes32 previousSigner = storedNode.signer; + if (previousSigner != node.signer) { + if (s_nodeSigners.contains(node.signer)) revert InvalidNodeSigner(); + storedNode.signer = node.signer; + s_nodeSigners.remove(previousSigner); + s_nodeSigners.add(node.signer); + } bytes32[] memory supportedHashedCapabilityIds = node.hashedCapabilityIds; if (supportedHashedCapabilityIds.length == 0) revert InvalidNodeCapabilities(supportedHashedCapabilityIds); - storedNode.configCount++; - uint32 capabilityConfigCount = storedNode.configCount; + uint32 capabilityConfigCount = ++storedNode.configCount; for (uint256 j; j < supportedHashedCapabilityIds.length; ++j) { if (!s_hashedCapabilityIds.contains(supportedHashedCapabilityIds[j])) revert InvalidNodeCapabilities(supportedHashedCapabilityIds); @@ -556,45 +601,37 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { storedNode.nodeOperatorId = node.nodeOperatorId; storedNode.p2pId = node.p2pId; - bytes32 previousSigner = storedNode.signer; - - if (storedNode.signer != node.signer) { - s_nodeSigners.remove(previousSigner); - storedNode.signer = node.signer; - s_nodeSigners.add(node.signer); - } emit NodeUpdated(node.p2pId, node.nodeOperatorId, node.signer); } } /// @notice Gets a node's data /// @param p2pId The P2P ID of the node to query for - /// @return NodeInfo The node data - /// @return configCount The number of times the node has been configured - function getNode(bytes32 p2pId) public view returns (NodeInfo memory, uint32 configCount) { + /// @return nodeInfo NodeInfo The node data + function getNode(bytes32 p2pId) public view returns (NodeInfo memory nodeInfo) { return ( NodeInfo({ nodeOperatorId: s_nodes[p2pId].nodeOperatorId, p2pId: s_nodes[p2pId].p2pId, signer: s_nodes[p2pId].signer, - hashedCapabilityIds: s_nodes[p2pId].supportedHashedCapabilityIds[s_nodes[p2pId].configCount].values() - }), - s_nodes[p2pId].configCount + hashedCapabilityIds: s_nodes[p2pId].supportedHashedCapabilityIds[s_nodes[p2pId].configCount].values(), + configCount: s_nodes[p2pId].configCount, + workflowDONId: s_nodes[p2pId].workflowDONId, + capabilitiesDONIds: s_nodes[p2pId].capabilitiesDONIds.values() + }) ); } /// @notice Gets all nodes - /// @return nodeInfo NodeInfo[] All nodes in the capability registry - /// @return configCounts uint32[] All the config counts for the nodes in the capability registry - function getNodes() external view returns (NodeInfo[] memory nodeInfo, uint32[] memory configCounts) { + /// @return NodeInfo[] All nodes in the capability registry + function getNodes() external view returns (NodeInfo[] memory) { bytes32[] memory p2pIds = s_nodeP2PIds.values(); - nodeInfo = new NodeInfo[](p2pIds.length); - configCounts = new uint32[](p2pIds.length); + NodeInfo[] memory nodesInfo = new NodeInfo[](p2pIds.length); for (uint256 i; i < p2pIds.length; ++i) { - (nodeInfo[i], configCounts[i]) = getNode(p2pIds[i]); + nodesInfo[i] = getNode(p2pIds[i]); } - return (nodeInfo, configCounts); + return nodesInfo; } /// @notice Adds a new capability to the capability registry @@ -740,8 +777,13 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { uint32 configCount = don.configCount; EnumerableSet.Bytes32Set storage nodeP2PIds = don.config[configCount].nodes; + bool isWorkflowDON = don.acceptsWorkflows; for (uint256 j; j < nodeP2PIds.length(); ++j) { - s_nodes[nodeP2PIds.at(j)].supportedDONIds.remove(donId); + if (isWorkflowDON) { + delete s_nodes[nodeP2PIds.at(j)].workflowDONId; + } else { + s_nodes[nodeP2PIds.at(j)].capabilitiesDONIds.remove(donId); + } } // DON config count starts at index 1 @@ -827,16 +869,23 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { // needed as the previous config will be overwritten by storing the latest config // at configCount for (uint256 i; i < prevDONCapabilityConfig.nodes.length(); ++i) { - s_nodes[prevDONCapabilityConfig.nodes.at(i)].supportedDONIds.remove(donParams.id); + s_nodes[prevDONCapabilityConfig.nodes.at(i)].capabilitiesDONIds.remove(donParams.id); + delete s_nodes[prevDONCapabilityConfig.nodes.at(i)].workflowDONId; } } for (uint256 i; i < nodes.length; ++i) { if (!donCapabilityConfig.nodes.add(nodes[i])) revert DuplicateDONNode(donParams.id, nodes[i]); - /// Fine to add a duplicate DON ID to the set of supported DON IDs again as the set - /// will only store unique DON IDs - s_nodes[nodes[i]].supportedDONIds.add(donParams.id); + if (donParams.acceptsWorkflows) { + if (s_nodes[nodes[i]].workflowDONId != donParams.id && s_nodes[nodes[i]].workflowDONId != 0) + revert NodePartOfWorkflowDON(donParams.id, nodes[i]); + s_nodes[nodes[i]].workflowDONId = donParams.id; + } else { + /// Fine to add a duplicate DON ID to the set of supported DON IDs again as the set + /// will only store unique DON IDs + s_nodes[nodes[i]].capabilitiesDONIds.add(donParams.id); + } } for (uint256 i; i < capabilityConfigurations.length; ++i) { diff --git a/contracts/src/v0.8/keystone/KeystoneForwarder.sol b/contracts/src/v0.8/keystone/KeystoneForwarder.sol index fe0597ae8f0..07b4b34da79 100644 --- a/contracts/src/v0.8/keystone/KeystoneForwarder.sol +++ b/contracts/src/v0.8/keystone/KeystoneForwarder.sol @@ -91,7 +91,7 @@ contract KeystoneForwarder is OwnerIsCreator, ITypeAndVersion, IRouter { uint256 internal constant SIGNATURE_LENGTH = 65; // ================================================================ - // │ IRouter │ + // │ Router │ // ================================================================ mapping(address forwarder => bool) internal s_forwarders; diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol index f9768f7105c..5335c0e2868 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol @@ -17,12 +17,12 @@ contract CapabilityRegistry_AddDONTest is BaseTest { s_capabilityRegistry.addNodeOperators(_getNodeOperators()); s_capabilityRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](3); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](3); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -32,14 +32,14 @@ contract CapabilityRegistry_AddDONTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeInfo({ + nodes[1] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: nodeTwoCapabilityIds }); - nodes[2] = CapabilityRegistry.NodeInfo({ + nodes[2] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_THREE_ID, p2pId: P2P_ID_THREE, signer: NODE_OPERATOR_THREE_SIGNER_ADDRESS, @@ -174,6 +174,24 @@ contract CapabilityRegistry_AddDONTest is BaseTest { s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } + function test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() public { + bytes32[] memory nodes = new bytes32[](2); + nodes[0] = P2P_ID; + nodes[1] = P2P_ID_TWO; + + CapabilityRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + capabilityId: s_basicHashedCapabilityId, + config: BASIC_CAPABILITY_CONFIG + }); + + s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + + vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfWorkflowDON.selector, 2, P2P_ID)); + s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + } + function test_AddDON() public { bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol index 7bb4eb43c4d..9399e257e32 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol @@ -20,12 +20,12 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { function test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() public { changePrank(STRANGER); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -38,14 +38,14 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { function test_RevertWhen_AddingNodeWithInvalidNodeOperator() public { changePrank(ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; uint32 invalidNodeOperatorId = 10000; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: invalidNodeOperatorId, // Invalid NOP p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -60,12 +60,12 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { function test_RevertWhen_SignerAddressEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: bytes32(""), @@ -78,12 +78,12 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { function test_RevertWhen_SignerAddressNotUnique() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -95,7 +95,7 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { changePrank(NODE_OPERATOR_TWO_ADMIN); // Try adding another node with the same signer address - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -107,12 +107,12 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { function test_RevertWhen_AddingDuplicateP2PId() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -127,12 +127,12 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { function test_RevertWhen_P2PIDEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: bytes32(""), signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -145,11 +145,11 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { function test_RevertWhen_AddingNodeWithoutCapabilities() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](0); - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -162,12 +162,12 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { function test_RevertWhen_AddingNodeWithInvalidCapability() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_nonExistentHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -178,15 +178,15 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { s_capabilityRegistry.addNodes(nodes); } - function test_AddsNodeInfo() public { + function test_AddsNodeParams() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -197,24 +197,24 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { emit NodeAdded(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NODE_OPERATOR_ONE_SIGNER_ADDRESS); s_capabilityRegistry.addNodes(nodes); - (CapabilityRegistry.NodeInfo memory node, uint32 configCount) = s_capabilityRegistry.getNode(P2P_ID); + CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.hashedCapabilityIds.length, 2); assertEq(node.hashedCapabilityIds[0], s_basicHashedCapabilityId); assertEq(node.hashedCapabilityIds[1], s_capabilityWithConfigurationContractId); - assertEq(configCount, 1); + assertEq(node.configCount, 1); } function test_OwnerCanAddNodes() public { changePrank(ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -225,12 +225,12 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { emit NodeAdded(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NODE_OPERATOR_ONE_SIGNER_ADDRESS); s_capabilityRegistry.addNodes(nodes); - (CapabilityRegistry.NodeInfo memory node, uint32 configCount) = s_capabilityRegistry.getNode(P2P_ID); + CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.hashedCapabilityIds.length, 2); assertEq(node.hashedCapabilityIds[0], s_basicHashedCapabilityId); assertEq(node.hashedCapabilityIds[1], s_capabilityWithConfigurationContractId); - assertEq(configCount, 1); + assertEq(node.configCount, 1); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol index f53803c4041..d56dce6c271 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol @@ -20,12 +20,12 @@ contract CapabilityRegistry_GetDONsTest is BaseTest { s_capabilityRegistry.addNodeOperators(_getNodeOperators()); s_capabilityRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](2); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](2); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -35,7 +35,7 @@ contract CapabilityRegistry_GetDONsTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeInfo({ + nodes[1] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol index 28fc33ab1da..e7a498e08c0 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol @@ -16,19 +16,19 @@ contract CapabilityRegistry_GetNodesTest is BaseTest { s_capabilityRegistry.addNodeOperators(_getNodeOperators()); s_capabilityRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](2); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](2); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - nodes[1] = CapabilityRegistry.NodeInfo({ + nodes[1] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -41,7 +41,7 @@ contract CapabilityRegistry_GetNodesTest is BaseTest { } function test_CorrectlyFetchesNodes() public view { - (CapabilityRegistry.NodeInfo[] memory nodes, uint32[] memory configCounts) = s_capabilityRegistry.getNodes(); + CapabilityRegistry.NodeInfo[] memory nodes = s_capabilityRegistry.getNodes(); assertEq(nodes.length, 2); assertEq(nodes[0].nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); @@ -50,7 +50,7 @@ contract CapabilityRegistry_GetNodesTest is BaseTest { assertEq(nodes[0].hashedCapabilityIds.length, 2); assertEq(nodes[0].hashedCapabilityIds[0], s_basicHashedCapabilityId); assertEq(nodes[0].hashedCapabilityIds[1], s_capabilityWithConfigurationContractId); - assertEq(configCounts[0], 1); + assertEq(nodes[0].configCount, 1); assertEq(nodes[1].nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(nodes[1].signer, NODE_OPERATOR_TWO_SIGNER_ADDRESS); @@ -58,7 +58,7 @@ contract CapabilityRegistry_GetNodesTest is BaseTest { assertEq(nodes[1].hashedCapabilityIds.length, 2); assertEq(nodes[1].hashedCapabilityIds[0], s_basicHashedCapabilityId); assertEq(nodes[1].hashedCapabilityIds[1], s_capabilityWithConfigurationContractId); - assertEq(configCounts[1], 1); + assertEq(nodes[1].configCount, 1); } function test_DoesNotIncludeRemovedNodes() public { @@ -67,7 +67,7 @@ contract CapabilityRegistry_GetNodesTest is BaseTest { nodesToRemove[0] = P2P_ID_TWO; s_capabilityRegistry.removeNodes(nodesToRemove); - (CapabilityRegistry.NodeInfo[] memory nodes, uint32[] memory configCounts) = s_capabilityRegistry.getNodes(); + CapabilityRegistry.NodeInfo[] memory nodes = s_capabilityRegistry.getNodes(); assertEq(nodes.length, 1); assertEq(nodes[0].nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); @@ -76,6 +76,6 @@ contract CapabilityRegistry_GetNodesTest is BaseTest { assertEq(nodes[0].hashedCapabilityIds.length, 2); assertEq(nodes[0].hashedCapabilityIds[0], s_basicHashedCapabilityId); assertEq(nodes[0].hashedCapabilityIds[1], s_capabilityWithConfigurationContractId); - assertEq(configCounts[0], 1); + assertEq(nodes[0].configCount, 1); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol index 8d5bfdeea6b..fde382db6f3 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol @@ -18,12 +18,12 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { s_capabilityRegistry.addNodeOperators(_getNodeOperators()); s_capabilityRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](2); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](2); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -33,7 +33,7 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeInfo({ + nodes[1] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol index ac59435e35a..14aa5922593 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol @@ -17,26 +17,26 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { s_capabilityRegistry.addNodeOperators(_getNodeOperators()); s_capabilityRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](3); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](3); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - nodes[1] = CapabilityRegistry.NodeInfo({ + nodes[1] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - nodes[2] = CapabilityRegistry.NodeInfo({ + nodes[2] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_THREE_ID, p2pId: P2P_ID_THREE, signer: NODE_OPERATOR_THREE_SIGNER_ADDRESS, @@ -75,7 +75,7 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { s_capabilityRegistry.removeNodes(nodes); } - function test_RevertWhen_NodePartOfDON() public { + function test_RevertWhen_NodePartOfCapabilitiesDON() public { changePrank(ADMIN); bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; @@ -88,9 +88,9 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { config: BASIC_CAPABILITY_CONFIG }); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, false, F_VALUE); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfDON.selector, P2P_ID)); + vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfCapabilitiesDON.selector, 1, P2P_ID)); s_capabilityRegistry.removeNodes(nodes); } @@ -114,7 +114,7 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { // Try remove nodes bytes32[] memory removedNodes = new bytes32[](1); removedNodes[0] = P2P_ID; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfDON.selector, P2P_ID)); + vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfWorkflowDON.selector, 1, P2P_ID)); s_capabilityRegistry.removeNodes(removedNodes); // Remove DON @@ -124,12 +124,12 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { // Remove node s_capabilityRegistry.removeNodes(removedNodes); - (CapabilityRegistry.NodeInfo memory node, uint32 configCount) = s_capabilityRegistry.getNode(P2P_ID); + CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); assertEq(node.hashedCapabilityIds.length, 0); - assertEq(configCount, 0); + assertEq(node.configCount, 0); } function test_CanRemoveWhenNodeNoLongerPartOfDON() public { @@ -153,7 +153,7 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { // Try remove nodes bytes32[] memory removedNodes = new bytes32[](1); removedNodes[0] = P2P_ID_TWO; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfDON.selector, P2P_ID_TWO)); + vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfWorkflowDON.selector, 1, P2P_ID_TWO)); s_capabilityRegistry.removeNodes(removedNodes); // Update nodes in DON @@ -164,12 +164,12 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { // Remove node s_capabilityRegistry.removeNodes(removedNodes); - (CapabilityRegistry.NodeInfo memory node, uint32 configCount) = s_capabilityRegistry.getNode(P2P_ID_TWO); + CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID_TWO); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); assertEq(node.hashedCapabilityIds.length, 0); - assertEq(configCount, 0); + assertEq(node.configCount, 0); } function test_RemovesNode() public { @@ -182,12 +182,12 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { emit NodeRemoved(P2P_ID); s_capabilityRegistry.removeNodes(nodes); - (CapabilityRegistry.NodeInfo memory node, uint32 configCount) = s_capabilityRegistry.getNode(P2P_ID); + CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); assertEq(node.hashedCapabilityIds.length, 0); - assertEq(configCount, 0); + assertEq(node.configCount, 0); } function test_CanAddNodeWithSameSignerAddressAfterRemoving() public { @@ -198,27 +198,27 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { s_capabilityRegistry.removeNodes(nodes); - CapabilityRegistry.NodeInfo[] memory NodeInfo = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodeParams = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - NodeInfo[0] = CapabilityRegistry.NodeInfo({ + nodeParams[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - s_capabilityRegistry.addNodes(NodeInfo); + s_capabilityRegistry.addNodes(nodeParams); - (CapabilityRegistry.NodeInfo memory node, uint32 configCount) = s_capabilityRegistry.getNode(P2P_ID); + CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.hashedCapabilityIds.length, 2); assertEq(node.hashedCapabilityIds[0], s_basicHashedCapabilityId); assertEq(node.hashedCapabilityIds[1], s_capabilityWithConfigurationContractId); - assertEq(configCount, 1); + assertEq(node.configCount, 1); } function test_OwnerCanRemoveNodes() public { @@ -231,11 +231,11 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { emit NodeRemoved(P2P_ID); s_capabilityRegistry.removeNodes(nodes); - (CapabilityRegistry.NodeInfo memory node, uint32 configCount) = s_capabilityRegistry.getNode(P2P_ID); + CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); assertEq(node.hashedCapabilityIds.length, 0); - assertEq(configCount, 0); + assertEq(node.configCount, 0); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol index 1737c19d272..96f6a32bbc7 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol @@ -18,12 +18,12 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { s_capabilityRegistry.addNodeOperators(_getNodeOperators()); s_capabilityRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](3); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](3); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -33,14 +33,14 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeInfo({ + nodes[1] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: nodeTwoCapabilityIds }); - nodes[2] = CapabilityRegistry.NodeInfo({ + nodes[2] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_THREE_ID, p2pId: P2P_ID_THREE, signer: NODE_OPERATOR_THREE_SIGNER_ADDRESS, diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol index da4e811c3ec..2f3f18d39a8 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol @@ -17,12 +17,12 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { s_capabilityRegistry.addNodeOperators(_getNodeOperators()); s_capabilityRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -32,7 +32,7 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { changePrank(NODE_OPERATOR_ONE_ADMIN); s_capabilityRegistry.addNodes(nodes); - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -45,12 +45,12 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { function test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() public { changePrank(STRANGER); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -63,12 +63,12 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { function test_RevertWhen_NodeDoesNotExist() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: INVALID_P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -81,12 +81,12 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { function test_RevertWhen_P2PIDEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: bytes32(""), signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -99,12 +99,12 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { function test_RevertWhen_SignerAddressEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: bytes32(""), @@ -117,12 +117,12 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { function test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -135,11 +135,11 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { function test_RevertWhen_UpdatingNodeWithoutCapabilities() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](0); - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -152,12 +152,12 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { function test_RevertWhen_AddingNodeWithInvalidCapability() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_nonExistentHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -171,12 +171,12 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { function test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; // Set node one's signer to another address - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: bytes32(abi.encodePacked(address(6666))), @@ -187,7 +187,7 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { // Set node two's signer to node one's signer changePrank(NODE_OPERATOR_TWO_ADMIN); - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -195,18 +195,18 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { }); s_capabilityRegistry.updateNodes(nodes); - (CapabilityRegistry.NodeInfo memory node, ) = s_capabilityRegistry.getNode(P2P_ID_TWO); + CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID_TWO); assertEq(node.signer, NODE_OPERATOR_ONE_SIGNER_ADDRESS); } - function test_UpdatesNodeInfo() public { + function test_UpdatesNodeParams() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NEW_NODE_SIGNER, @@ -217,23 +217,23 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { emit NodeUpdated(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NEW_NODE_SIGNER); s_capabilityRegistry.updateNodes(nodes); - (CapabilityRegistry.NodeInfo memory node, uint32 configCount) = s_capabilityRegistry.getNode(P2P_ID); + CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.signer, NEW_NODE_SIGNER); assertEq(node.hashedCapabilityIds.length, 1); assertEq(node.hashedCapabilityIds[0], s_basicHashedCapabilityId); - assertEq(configCount, 2); + assertEq(node.configCount, 2); } function test_OwnerCanUpdateNodes() public { changePrank(ADMIN); - CapabilityRegistry.NodeInfo[] memory nodes = new CapabilityRegistry.NodeInfo[](1); + CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeInfo({ + nodes[0] = CapabilityRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NEW_NODE_SIGNER, @@ -244,12 +244,12 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { emit NodeUpdated(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NEW_NODE_SIGNER); s_capabilityRegistry.updateNodes(nodes); - (CapabilityRegistry.NodeInfo memory node, uint32 configCount) = s_capabilityRegistry.getNode(P2P_ID); + CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.signer, NEW_NODE_SIGNER); assertEq(node.hashedCapabilityIds.length, 1); assertEq(node.hashedCapabilityIds[0], s_basicHashedCapabilityId); - assertEq(configCount, 2); + assertEq(node.configCount, 2); } } diff --git a/core/capabilities/reader.go b/core/capabilities/reader.go index 0e664a73947..a3d55751a8e 100644 --- a/core/capabilities/reader.go +++ b/core/capabilities/reader.go @@ -91,14 +91,14 @@ func (r *remoteRegistryReader) state(ctx context.Context) (state, error) { idsToCapabilities[caps.HashedCapabilityIds[i]] = c } - nodes := &kcr.GetNodes{} + nodes := []kcr.CapabilityRegistryNodeInfo{} err = r.r.GetLatestValue(ctx, "capabilityRegistry", "getNodes", nil, &nodes) if err != nil { return state{}, err } idsToNodes := map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{} - for _, node := range nodes.NodeInfo { + for _, node := range nodes { idsToNodes[node.P2pId] = node } diff --git a/core/capabilities/reader_test.go b/core/capabilities/reader_test.go index 395a08c1e19..ded525f6142 100644 --- a/core/capabilities/reader_test.go +++ b/core/capabilities/reader_test.go @@ -154,25 +154,31 @@ func TestReader_Integration(t *testing.T) { randomWord(), } - nodes := []kcr.CapabilityRegistryNodeInfo{ + signersSet := [][32]byte{ + randomWord(), + randomWord(), + randomWord(), + } + + nodes := []kcr.CapabilityRegistryNodeParams{ { // The first NodeOperatorId has id 1 since the id is auto-incrementing. NodeOperatorId: uint32(1), - Signer: randomWord(), + Signer: signersSet[0], P2pId: nodeSet[0], HashedCapabilityIds: [][32]byte{cid}, }, { // The first NodeOperatorId has id 1 since the id is auto-incrementing. NodeOperatorId: uint32(1), - Signer: randomWord(), + Signer: signersSet[1], P2pId: nodeSet[1], HashedCapabilityIds: [][32]byte{cid}, }, { // The first NodeOperatorId has id 1 since the id is auto-incrementing. NodeOperatorId: uint32(1), - Signer: randomWord(), + Signer: signersSet[2], P2pId: nodeSet[2], HashedCapabilityIds: [][32]byte{cid}, }, @@ -225,11 +231,44 @@ func TestReader_Integration(t *testing.T) { CapabilityConfigurations: cfgs, }, s.IDsToDONs[1]) + nodesInfo := []kcr.CapabilityRegistryNodeInfo{ + { + // The first NodeOperatorId has id 1 since the id is auto-incrementing. + NodeOperatorId: uint32(1), + ConfigCount: 1, + WorkflowDONId: 1, + Signer: signersSet[0], + P2pId: nodeSet[0], + HashedCapabilityIds: [][32]byte{cid}, + CapabilitiesDONIds: []*big.Int{}, + }, + { + // The first NodeOperatorId has id 1 since the id is auto-incrementing. + NodeOperatorId: uint32(1), + ConfigCount: 1, + WorkflowDONId: 1, + Signer: signersSet[1], + P2pId: nodeSet[1], + HashedCapabilityIds: [][32]byte{cid}, + CapabilitiesDONIds: []*big.Int{}, + }, + { + // The first NodeOperatorId has id 1 since the id is auto-incrementing. + NodeOperatorId: uint32(1), + ConfigCount: 1, + WorkflowDONId: 1, + Signer: signersSet[2], + P2pId: nodeSet[2], + HashedCapabilityIds: [][32]byte{cid}, + CapabilitiesDONIds: []*big.Int{}, + }, + } + assert.Len(t, s.IDsToNodes, 3) assert.Equal(t, map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{ - nodeSet[0]: nodes[0], - nodeSet[1]: nodes[1], - nodeSet[2]: nodes[2], + nodeSet[0]: nodesInfo[0], + nodeSet[1]: nodesInfo[1], + nodeSet[2]: nodesInfo[2], }, s.IDsToNodes) node, err := reader.LocalNode(ctx) diff --git a/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go b/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go index 6925beaed72..3b8f26b4983 100644 --- a/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go +++ b/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go @@ -55,9 +55,12 @@ type CapabilityRegistryDONInfo struct { type CapabilityRegistryNodeInfo struct { NodeOperatorId uint32 + ConfigCount uint32 + WorkflowDONId uint32 Signer [32]byte P2pId [32]byte HashedCapabilityIds [][32]byte + CapabilitiesDONIds []*big.Int } type CapabilityRegistryNodeOperator struct { @@ -65,9 +68,16 @@ type CapabilityRegistryNodeOperator struct { Name string } +type CapabilityRegistryNodeParams struct { + NodeOperatorId uint32 + Signer [32]byte + P2pId [32]byte + HashedCapabilityIds [][32]byte +} + var CapabilityRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"nodeCount\",\"type\":\"uint256\"}],\"name\":\"InvalidFaultTolerance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"InvalidNodeCapabilities\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeOperatorAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"InvalidNodeP2PId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lengthOne\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lengthTwo\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfDON\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDeprecated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"name\":\"addCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"addDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"addNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"addNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"deprecateCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilities\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedId\",\"type\":\"bytes32\"}],\"name\":\"getCapability\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getCapabilityConfigs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"getHashedCapabilityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"getNode\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo\",\"name\":\"\",\"type\":\"tuple\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"getNodeOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeOperators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodes\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"nodeInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"uint32[]\",\"name\":\"configCounts\",\"type\":\"uint32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"isCapabilityDeprecated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"donIds\",\"type\":\"uint32[]\"}],\"name\":\"removeDONs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"}],\"name\":\"removeNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"removedNodeP2PIds\",\"type\":\"bytes32[]\"}],\"name\":\"removeNodes\",\"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\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"updateNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052600e80546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b614e4180620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635e65e309116100ee5780638da5cb5b11610097578063d8bc7b6811610071578063d8bc7b68146103f7578063ddbe4f821461040a578063e29581aa14610420578063f2fde38b1461043657600080fd5b80638da5cb5b1461039c5780639cb7c5f4146103c4578063d59a79f6146103e457600080fd5b806373ac22b4116100c857806373ac22b41461036e57806379ba50971461038157806386fa42461461038957600080fd5b80635e65e3091461033357806366acaa3314610346578063715f52951461035b57600080fd5b8063235374051161015b578063398f377311610135578063398f3773146102cb5780633f2a13c9146102de57806350c946fe146102ff5780635d83d9671461032057600080fd5b80632353740514610285578063275459f2146102a55780632c01a1e8146102b857600080fd5b80631d05394c1161018c5780631d05394c1461023b578063214502431461025057806322bdbcbc1461026557600080fd5b80630fe5800a146101b357806312570011146101d9578063181f5a77146101fc575b600080fd5b6101c66101c1366004613c55565b610449565b6040519081526020015b60405180910390f35b6101ec6101e7366004613cb9565b61047d565b60405190151581526020016101d0565b604080518082018252601881527f4361706162696c697479526567697374727920312e302e300000000000000000602082015290516101d09190613d40565b61024e610249366004613d98565b61048a565b005b610258610646565b6040516101d09190613ef8565b610278610273366004613f91565b6107ab565b6040516101d09190613fe9565b610298610293366004613f91565b610898565b6040516101d09190613ffc565b61024e6102b3366004613d98565b6108dc565b61024e6102c6366004613d98565b6109b3565b61024e6102d9366004613d98565b610bd6565b6102f16102ec36600461400f565b610d9e565b6040516101d0929190614039565b61031261030d366004613cb9565b610f8a565b6040516101d0929190614097565b61024e61032e366004613d98565b61102f565b61024e610341366004613d98565b61117d565b61034e6115ef565b6040516101d091906140bf565b61024e610369366004613d98565b6117da565b61024e61037c366004613d98565b611895565b61024e611d3a565b61024e610397366004614132565b611e37565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d0565b6103d76103d2366004613cb9565b61217d565b6040516101d0919061425a565b61024e6103f236600461428c565b612382565b61024e610405366004614341565b61244b565b610412612515565b6040516101d09291906143e6565b610428612878565b6040516101d0929190614476565b61024e61044436600461454c565b6129e7565b6000828260405160200161045e929190614039565b6040516020818303038152906040528051906020012090505b92915050565b60006104776005836129fb565b610492612a16565b60005b818110156106415760008383838181106104b1576104b1614567565b90506020020160208101906104c69190613f91565b63ffffffff8082166000908152600d60209081526040808320805464010000000090049094168084526001850190925282209394509192905b61050882612a99565b8110156105605761054f8563ffffffff16600c60006105308587612aa390919063ffffffff16565b8152602001908152602001600020600401612aaf90919063ffffffff16565b50610559816145c5565b90506104ff565b508254640100000000900463ffffffff166000036105b7576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff851660048201526024015b60405180910390fd5b63ffffffff84166000818152600d6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000001690558051938452908301919091527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a1505050508061063a906145c5565b9050610495565b505050565b600e54606090640100000000900463ffffffff1660006106676001836145fd565b63ffffffff1667ffffffffffffffff81111561068557610685613aef565b60405190808252806020026020018201604052801561070c57816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816106a35790505b509050600060015b8363ffffffff168163ffffffff1610156107885763ffffffff8082166000908152600d602052604090205416156107785761074e81612abb565b83838151811061076057610760614567565b602002602001018190525081610775906145c5565b91505b6107818161461a565b9050610714565b506107946001846145fd565b63ffffffff1681146107a4578082525b5092915050565b60408051808201909152600081526060602082015263ffffffff82166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff168352600181018054919284019161080f9061463d565b80601f016020809104026020016040519081016040528092919081815260200182805461083b9061463d565b80156108885780601f1061085d57610100808354040283529160200191610888565b820191906000526020600020905b81548152906001019060200180831161086b57829003601f168201915b5050505050815250509050919050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c081019190915261047782612abb565b6108e4612a16565b60005b63ffffffff811682111561064157600083838363ffffffff1681811061090f5761090f614567565b90506020020160208101906109249190613f91565b63ffffffff81166000908152600b6020526040812080547fffffffffffffffffffffffff000000000000000000000000000000000000000016815591925061096f6001830182613a82565b505060405163ffffffff8216907fa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a90600090a2506109ac8161461a565b90506108e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610bd05760008484838181106109ed576109ed614567565b602090810292909201356000818152600c90935260409092206001810154929350919050610a4a576040517fd82f6adb000000000000000000000000000000000000000000000000000000008152600481018390526024016105ae565b6000610a5882600401612a99565b1115610a93576040517f34a4a3f6000000000000000000000000000000000000000000000000000000008152600481018390526024016105ae565b83158015610acd5750805463ffffffff166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15610b06576040517f9473075d0000000000000000000000000000000000000000000000000000000081523360048201526024016105ae565b6001810154610b1790600790612aaf565b506002810154610b2990600990612aaf565b506000828152600c6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016815560018101829055600281018290559060048201818181610b7e8282613abc565b5050505050507f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320582604051610bb591815260200190565b60405180910390a1505080610bc9906145c5565b90506109d1565b50505050565b610bde612a16565b60005b81811015610641576000838383818110610bfd57610bfd614567565b9050602002810190610c0f9190614690565b610c18906146ce565b805190915073ffffffffffffffffffffffffffffffffffffffff16610c69576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e54604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600b909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610cf59082614786565b5050600e8054909150600090610d109063ffffffff1661461a565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff168163ffffffff167f78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e8460200151604051610d839190613d40565b60405180910390a3505080610d97906145c5565b9050610be1565b63ffffffff8083166000908152600d60209081526040808320805464010000000090049094168084526001909401825280832085845260030190915281208054606093849390929091610df09061463d565b80601f0160208091040260200160405190810160405280929190818152602001828054610e1c9061463d565b8015610e695780601f10610e3e57610100808354040283529160200191610e69565b820191906000526020600020905b815481529060010190602001808311610e4c57829003601f168201915b5050506000888152600260208190526040909120015492935060609262010000900473ffffffffffffffffffffffffffffffffffffffff16159150610f7c905057600086815260026020819052604091829020015490517f8318ed5d00000000000000000000000000000000000000000000000000000000815263ffffffff891660048201526201000090910473ffffffffffffffffffffffffffffffffffffffff1690638318ed5d90602401600060405180830381865afa158015610f33573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610f7991908101906148a0565b90505b9093509150505b9250929050565b6040805160808101825260008082526020820181905291810191909152606080820152604080516080810182526000848152600c6020908152838220805463ffffffff80821686526001830154848701526002830154868801526401000000009091041683526003019052918220606082019061100690612d8f565b90526000938452600c602052604090932054929364010000000090930463ffffffff1692915050565b611037612a16565b60005b8181101561064157600083838381811061105657611056614567565b9050602002013590506110738160036129fb90919063ffffffff16565b6110ac576040517fe181733f000000000000000000000000000000000000000000000000000000008152600481018290526024016105ae565b6110b7600582612d9c565b6110f0576040517ff7d7a294000000000000000000000000000000000000000000000000000000008152600481018290526024016105ae565b6000818152600260205260408120906111098282613a82565b611117600183016000613a82565b5060020180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a250611176816145c5565b905061103a565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610bd05760008484838181106111b7576111b7614567565b90506020028101906111c9919061490e565b6111d290614942565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff1682526001810180549596509394919390928401916112289061463d565b80601f01602080910402602001604051908101604052809291908181526020018280546112549061463d565b80156112a15780601f10611276576101008083540402835291602001916112a1565b820191906000526020600020905b81548152906001019060200180831161128457829003601f168201915b5050505050815250509050831580156112d15750805173ffffffffffffffffffffffffffffffffffffffff163314155b1561130a576040517f9473075d0000000000000000000000000000000000000000000000000000000081523360048201526024016105ae565b6040808301516000908152600c60205220600181015461135e5782604001516040517fd82f6adb0000000000000000000000000000000000000000000000000000000081526004016105ae91815260200190565b6020830151158061138e5750826020015181600101541415801561138e5750602083015161138e906007906129fb565b156113c5576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060830151805160000361140757806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016105ae9190614a15565b8154640100000000900463ffffffff168260046114238361461a565b82546101009290920a63ffffffff8181021990931691831602179091558354640100000000900416905060005b825181101561151b5761148683828151811061146e5761146e614567565b602002602001015160036129fb90919063ffffffff16565b6114be57826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016105ae9190614a15565b61150a8382815181106114d3576114d3614567565b60200260200101518560030160008563ffffffff1663ffffffff168152602001908152602001600020612d9c90919063ffffffff16565b50611514816145c5565b9050611450565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9091161783556040850151600284015560018301546020860151811461158d57611572600782612aaf565b5060208601516001850181905561158b90600790612d9c565b505b85516040808801516020808a015183519283529082015263ffffffff909216917f4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b910160405180910390a2505050505050806115e8906145c5565b905061119b565b600e5460609063ffffffff1660006116086001836145fd565b63ffffffff1667ffffffffffffffff81111561162657611626613aef565b60405190808252806020026020018201604052801561166c57816020015b6040805180820190915260008152606060208201528152602001906001900390816116445790505b509050600060015b8363ffffffff168163ffffffff1610156117c45763ffffffff81166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16156117b45763ffffffff81166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff16835260018101805491928401916117089061463d565b80601f01602080910402602001604051908101604052809291908181526020018280546117349061463d565b80156117815780601f1061175657610100808354040283529160200191611781565b820191906000526020600020905b81548152906001019060200180831161176457829003601f168201915b50505050508152505083838151811061179c5761179c614567565b6020026020010181905250816117b1906145c5565b91505b6117bd8161461a565b9050611674565b50600e546107949060019063ffffffff166145fd565b6117e2612a16565b60005b8181101561064157600083838381811061180157611801614567565b90506020028101906118139190614a28565b61181c90614a6b565b9050600061183282600001518360200151610449565b905061183f600382612d9c565b611878576040517febf52551000000000000000000000000000000000000000000000000000000008152600481018290526024016105ae565b6118828183612da8565b50508061188e906145c5565b90506117e5565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610bd05760008484838181106118cf576118cf614567565b90506020028101906118e1919061490e565b6118ea90614942565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff1682526001810180549596509394919390928401916119409061463d565b80601f016020809104026020016040519081016040528092919081815260200182805461196c9061463d565b80156119b95780601f1061198e576101008083540402835291602001916119b9565b820191906000526020600020905b81548152906001019060200180831161199c57829003601f168201915b50505091909252505081519192505073ffffffffffffffffffffffffffffffffffffffff16611a1f5781516040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff90911660048201526024016105ae565b83158015611a445750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611a7d576040517f9473075d0000000000000000000000000000000000000000000000000000000081523360048201526024016105ae565b6040808301516000908152600c60205220600181015415611ad25782604001516040517f546184830000000000000000000000000000000000000000000000000000000081526004016105ae91815260200190565b6040830151611b155782604001516040517f64e2ee920000000000000000000000000000000000000000000000000000000081526004016105ae91815260200190565b60208301511580611b3257506020830151611b32906007906129fb565b15611b69576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608301518051600003611bab57806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016105ae9190614a15565b81548290600490611bc990640100000000900463ffffffff1661461a565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041660005b8251811015611c7057611c1283828151811061146e5761146e614567565b611c4a57826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016105ae9190614a15565b611c5f8382815181106114d3576114d3614567565b50611c69816145c5565b9050611bf4565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff91821617845560408601516002850155602086015160018501819055611cc69160079190612d9c16565b506040850151611cd890600990612d9c565b50845160408087015160208089015183519283529082015263ffffffff909216917f74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05910160405180910390a2505050505080611d33906145c5565b90506118b3565b60015473ffffffffffffffffffffffffffffffffffffffff163314611dbb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016105ae565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b828114611e7a576040517fab8b67c600000000000000000000000000000000000000000000000000000000815260048101849052602481018290526044016105ae565b6000805473ffffffffffffffffffffffffffffffffffffffff16905b84811015612175576000868683818110611eb257611eb2614567565b9050602002016020810190611ec79190613f91565b63ffffffff81166000908152600b6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff16611f36576040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff831660048201526024016105ae565b6000868685818110611f4a57611f4a614567565b9050602002810190611f5c9190614690565b611f65906146ce565b805190915073ffffffffffffffffffffffffffffffffffffffff16611fb6576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff163314801590611ff357503373ffffffffffffffffffffffffffffffffffffffff861614155b1561202c576040517f9473075d0000000000000000000000000000000000000000000000000000000081523360048201526024016105ae565b8051825473ffffffffffffffffffffffffffffffffffffffff90811691161415806120a857506020808201516040516120659201613d40565b604051602081830303815290604052805190602001208260010160405160200161208f9190614b11565b6040516020818303038152906040528051906020012014155b1561216157805182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602081015160018301906121029082614786565b50806000015173ffffffffffffffffffffffffffffffffffffffff168363ffffffff167f86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a2883602001516040516121589190613d40565b60405180910390a35b5050508061216e906145c5565b9050611e96565b505050505050565b6121ad6040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b60008281526002602052604090819020815160a081019092528054829082906121d59061463d565b80601f01602080910402602001604051908101604052809291908181526020018280546122019061463d565b801561224e5780601f106122235761010080835404028352916020019161224e565b820191906000526020600020905b81548152906001019060200180831161223157829003601f168201915b505050505081526020016001820180546122679061463d565b80601f01602080910402602001604051908101604052809291908181526020018280546122939061463d565b80156122e05780601f106122b5576101008083540402835291602001916122e0565b820191906000526020600020905b8154815290600101906020018083116122c357829003601f168201915b5050509183525050600282015460209091019060ff1660038111156123075761230761419e565b60038111156123185761231861419e565b81526020016002820160019054906101000a900460ff1660018111156123405761234061419e565b60018111156123515761235161419e565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b61238a612a16565b63ffffffff8089166000908152600d60205260408120546401000000009004909116908190036123ee576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a1660048201526024016105ae565b612440888888886040518060a001604052808f63ffffffff168152602001876124169061461a565b97508763ffffffff1681526020018a1515815260200189151581526020018860ff1681525061303c565b505050505050505050565b612453612a16565b600e805460009164010000000090910463ffffffff169060046124758361461a565b82546101009290920a63ffffffff81810219909316918316021790915581166000818152600d602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a08101835292835260019083015286151590820152841515606082015260ff8416608082015290915061250b90899089908990899061303c565b5050505050505050565b6060806125226003612d8f565b915060006125306005612a99565b835161253c9190614bba565b90508067ffffffffffffffff81111561255757612557613aef565b6040519080825280602002602001820160405280156125b857816020015b6125a56040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b8152602001906001900390816125755790505b50915060008167ffffffffffffffff8111156125d6576125d6613aef565b6040519080825280602002602001820160405280156125ff578160200160208202803683370190505b5090506000805b855181101561286e57600086828151811061262357612623614567565b602002602001015190506126418160056129fb90919063ffffffff16565b61285d5760008181526002602052604090819020815160a0810190925280548290829061266d9061463d565b80601f01602080910402602001604051908101604052809291908181526020018280546126999061463d565b80156126e65780601f106126bb576101008083540402835291602001916126e6565b820191906000526020600020905b8154815290600101906020018083116126c957829003601f168201915b505050505081526020016001820180546126ff9061463d565b80601f016020809104026020016040519081016040528092919081815260200182805461272b9061463d565b80156127785780601f1061274d57610100808354040283529160200191612778565b820191906000526020600020905b81548152906001019060200180831161275b57829003601f168201915b5050509183525050600282015460209091019060ff16600381111561279f5761279f61419e565b60038111156127b0576127b061419e565b81526020016002820160019054906101000a900460ff1660018111156127d8576127d861419e565b60018111156127e9576127e961419e565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff16602090910152865187908590811061282857612828614567565b60200260200101819052508084848151811061284657612846614567565b602090810291909101015261285a836145c5565b92505b50612867816145c5565b9050612606565b5090949293505050565b60608060006128876009612d8f565b9050805167ffffffffffffffff8111156128a3576128a3613aef565b60405190808252806020026020018201604052801561291257816020015b60408051608081018252600080825260208083018290529282015260608082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816128c15790505b509250805167ffffffffffffffff81111561292f5761292f613aef565b604051908082528060200260200182016040528015612958578160200160208202803683370190505b50915060005b81518110156129e15761298982828151811061297c5761297c614567565b6020026020010151610f8a565b85838151811061299b5761299b614567565b602002602001018584815181106129b4576129b4614567565b602002602001018263ffffffff1663ffffffff168152508290525050806129da906145c5565b905061295e565b50509091565b6129ef612a16565b6129f8816136e4565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612a97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016105ae565b565b6000610477825490565b6000612a0f83836137d9565b6000612a0f8383613803565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff8581168352600d8252848320805464010000000090049091168084526001909101825284832060028101805487518186028101860190985280885295969295919493909190830182828015612b6c57602002820191906000526020600020905b815481526020019060010190808311612b58575b505050505090506000815167ffffffffffffffff811115612b8f57612b8f613aef565b604051908082528060200260200182016040528015612bd557816020015b604080518082019091526000815260606020820152815260200190600190039081612bad5790505b50905060005b8151811015612cf6576040518060400160405280848381518110612c0157612c01614567565b60200260200101518152602001856003016000868581518110612c2657612c26614567565b602002602001015181526020019081526020016000208054612c479061463d565b80601f0160208091040260200160405190810160405280929190818152602001828054612c739061463d565b8015612cc05780601f10612c9557610100808354040283529160200191612cc0565b820191906000526020600020905b815481529060010190602001808311612ca357829003601f168201915b5050505050815250828281518110612cda57612cda614567565b602002602001018190525080612cef906145c5565b9050612bdb565b506040805160e08101825263ffffffff8089166000818152600d6020818152868320548086168752948b168187015260ff680100000000000000008604811697870197909752690100000000000000000085048716151560608701529290915290526a010000000000000000000090049091161515608082015260a08101612d7d85612d8f565b81526020019190915295945050505050565b60606000612a0f836138f6565b6000612a0f8383613952565b608081015173ffffffffffffffffffffffffffffffffffffffff1615612ef657608081015173ffffffffffffffffffffffffffffffffffffffff163b1580612ea1575060808101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f78bea72100000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff909116906301ffc9a790602401602060405180830381865afa158015612e7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e9f9190614bcd565b155b15612ef65760808101516040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016105ae565b600082815260026020526040902081518291908190612f159082614786565b5060208201516001820190612f2a9082614786565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836003811115612f6c57612f6c61419e565b021790555060608201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836001811115612fb357612fb361419e565b0217905550608091909101516002909101805473ffffffffffffffffffffffffffffffffffffffff90921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405182907f04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae90600090a25050565b805163ffffffff9081166000908152600d602090815260408083208286015190941683526001909301905220608082015160ff16158061308e575060808201518590613089906001614bea565b60ff16115b156130d75760808201516040517f25b4d61800000000000000000000000000000000000000000000000000000000815260ff9091166004820152602481018690526044016105ae565b6001826020015163ffffffff16111561318357815163ffffffff166000908152600d60209081526040822090840151600191820191839161311891906145fd565b63ffffffff1663ffffffff168152602001908152602001600020905060005b61314082612a99565b8110156131805761316f846000015163ffffffff16600c60006105308587600001612aa390919063ffffffff16565b50613179816145c5565b9050613137565b50505b60005b8581101561326d576131b38787838181106131a3576131a3614567565b8592602090910201359050612d9c565b6132145782518787838181106131cb576131cb614567565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff909416600485015260200291909101356024830152506044016105ae565b825161325c9063ffffffff16600c60008a8a8681811061323657613236614567565b905060200201358152602001908152602001600020600401612d9c90919063ffffffff16565b50613266816145c5565b9050613186565b5060005b83811015613559573685858381811061328c5761328c614567565b905060200281019061329e9190614690565b90506132ac600382356129fb565b6132e5576040517fe181733f000000000000000000000000000000000000000000000000000000008152813560048201526024016105ae565b6132f1600582356129fb565b1561332b576040517ff7d7a294000000000000000000000000000000000000000000000000000000008152813560048201526024016105ae565b80356000908152600384016020526040812080546133489061463d565b905011156133945783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff9091166004820152813560248201526044016105ae565b60005b878110156134a65761343b8235600c60008c8c868181106133ba576133ba614567565b9050602002013581526020019081526020016000206003016000600c60008e8e888181106133ea576133ea614567565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020019081526020016000206129fb90919063ffffffff16565b6134965788888281811061345157613451614567565b6040517fa7e7925000000000000000000000000000000000000000000000000000000000815260209091029290920135600483015250823560248201526044016105ae565b61349f816145c5565b9050613397565b50600283018054600181018255600091825260209182902083359101556134cf90820182614c03565b823560009081526003860160205260409020916134ed919083614c68565b50835160208086015161354892918435908c908c9061350e90880188614c03565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506139a192505050565b50613552816145c5565b9050613271565b50604080830151835163ffffffff9081166000908152600d602090815284822080549415156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff90951694909417909355606086015186518316825284822080549115156a0100000000000000000000027fffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffff9092169190911790556080860151865183168252848220805460ff9290921668010000000000000000027fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651926136d4929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613763576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016105ae565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008260000182815481106137f0576137f0614567565b9060005260206000200154905092915050565b600081815260018301602052604081205480156138ec576000613827600183614bba565b855490915060009061383b90600190614bba565b90508181146138a057600086600001828154811061385b5761385b614567565b906000526020600020015490508087600001848154811061387e5761387e614567565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806138b1576138b1614d83565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610477565b6000915050610477565b60608160000180548060200260200160405190810160405280929190818152602001828054801561394657602002820191906000526020600020905b815481526020019060010190808311613932575b50505050509050919050565b600081815260018301602052604081205461399957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610477565b506000610477565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff161561217557600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c90613a48908690869086908b908d90600401614db2565b600060405180830381600087803b158015613a6257600080fd5b505af1158015613a76573d6000803e3d6000fd5b50505050505050505050565b508054613a8e9061463d565b6000825580601f10613a9e575050565b601f0160209004906000526020600020908101906129f89190613ad6565b50805460008255906000526020600020908101906129f891905b5b80821115613aeb5760008155600101613ad7565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715613b4157613b41613aef565b60405290565b60405160a0810167ffffffffffffffff81118282101715613b4157613b41613aef565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613bb157613bb1613aef565b604052919050565b600067ffffffffffffffff821115613bd357613bd3613aef565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613c1057600080fd5b8135613c23613c1e82613bb9565b613b6a565b818152846020838601011115613c3857600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613c6857600080fd5b823567ffffffffffffffff80821115613c8057600080fd5b613c8c86838701613bff565b93506020850135915080821115613ca257600080fd5b50613caf85828601613bff565b9150509250929050565b600060208284031215613ccb57600080fd5b5035919050565b60005b83811015613ced578181015183820152602001613cd5565b50506000910152565b60008151808452613d0e816020860160208601613cd2565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612a0f6020830184613cf6565b60008083601f840112613d6557600080fd5b50813567ffffffffffffffff811115613d7d57600080fd5b6020830191508360208260051b8501011115610f8357600080fd5b60008060208385031215613dab57600080fd5b823567ffffffffffffffff811115613dc257600080fd5b613dce85828601613d53565b90969095509350505050565b600081518084526020808501945080840160005b83811015613e0a57815187529582019590820190600101613dee565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b85811015613e715782840389528151805185528501516040868601819052613e5d81870183613cf6565b9a87019a9550505090840190600101613e33565b5091979650505050505050565b600063ffffffff8083511684528060208401511660208501525060ff604083015116604084015260608201511515606084015260808201511515608084015260a082015160e060a0850152613ed660e0850182613dda565b905060c083015184820360c0860152613eef8282613e15565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613f6b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452613f59858351613e7e565b94509285019290850190600101613f1f565b5092979650505050505050565b803563ffffffff81168114613f8c57600080fd5b919050565b600060208284031215613fa357600080fd5b612a0f82613f78565b73ffffffffffffffffffffffffffffffffffffffff81511682526000602082015160406020850152613fe16040850182613cf6565b949350505050565b602081526000612a0f6020830184613fac565b602081526000612a0f6020830184613e7e565b6000806040838503121561402257600080fd5b61402b83613f78565b946020939093013593505050565b60408152600061404c6040830185613cf6565b8281036020840152613eef8185613cf6565b63ffffffff815116825260208101516020830152604081015160408301526000606082015160806060850152613fe16080850182613dda565b6040815260006140aa604083018561405e565b905063ffffffff831660208301529392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015613f6b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452614120858351613fac565b945092850192908501906001016140e6565b6000806000806040858703121561414857600080fd5b843567ffffffffffffffff8082111561416057600080fd5b61416c88838901613d53565b9096509450602087013591508082111561418557600080fd5b5061419287828801613d53565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160a084526141e260a0850182613cf6565b9050602083015184820360208601526141fb8282613cf6565b9150506040830151600481106142135761421361419e565b604085015260608301516002811061422d5761422d61419e565b606085015260809283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b602081526000612a0f60208301846141cd565b80151581146129f857600080fd5b803560ff81168114613f8c57600080fd5b60008060008060008060008060c0898b0312156142a857600080fd5b6142b189613f78565b9750602089013567ffffffffffffffff808211156142ce57600080fd5b6142da8c838d01613d53565b909950975060408b01359150808211156142f357600080fd5b506143008b828c01613d53565b90965094505060608901356143148161426d565b925060808901356143248161426d565b915061433260a08a0161427b565b90509295985092959890939650565b600080600080600080600060a0888a03121561435c57600080fd5b873567ffffffffffffffff8082111561437457600080fd5b6143808b838c01613d53565b909950975060208a013591508082111561439957600080fd5b506143a68a828b01613d53565b90965094505060408801356143ba8161426d565b925060608801356143ca8161426d565b91506143d86080890161427b565b905092959891949750929550565b6040815260006143f96040830185613dda565b6020838203818501528185518084528284019150828160051b85010183880160005b83811015614467577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08784030185526144558383516141cd565b9486019492509085019060010161441b565b50909998505050505050505050565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b838110156144eb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08887030185526144d986835161405e565b9550938201939082019060010161449f565b50508584038187015286518085528782019482019350915060005b82811015613e7157845163ffffffff1684529381019392810192600101614506565b803573ffffffffffffffffffffffffffffffffffffffff81168114613f8c57600080fd5b60006020828403121561455e57600080fd5b612a0f82614528565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036145f6576145f6614596565b5060010190565b63ffffffff8281168282160390808211156107a4576107a4614596565b600063ffffffff80831681810361463357614633614596565b6001019392505050565b600181811c9082168061465157607f821691505b60208210810361468a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126146c457600080fd5b9190910192915050565b6000604082360312156146e057600080fd5b6040516040810167ffffffffffffffff828210818311171561470457614704613aef565b8160405261471185614528565b8352602085013591508082111561472757600080fd5b5061473436828601613bff565b60208301525092915050565b601f82111561064157600081815260208120601f850160051c810160208610156147675750805b601f850160051c820191505b8181101561217557828155600101614773565b815167ffffffffffffffff8111156147a0576147a0613aef565b6147b4816147ae845461463d565b84614740565b602080601f83116001811461480757600084156147d15750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612175565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561485457888601518255948401946001909101908401614835565b508582101561489057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156148b257600080fd5b815167ffffffffffffffff8111156148c957600080fd5b8201601f810184136148da57600080fd5b80516148e8613c1e82613bb9565b8181528560208385010111156148fd57600080fd5b613eef826020830160208601613cd2565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818336030181126146c457600080fd5b60006080823603121561495457600080fd5b61495c613b1e565b61496583613f78565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff8082111561499657600080fd5b9085019036601f8301126149a957600080fd5b8135818111156149bb576149bb613aef565b8060051b91506149cc848301613b6a565b81815291830184019184810190368411156149e657600080fd5b938501935b83851015614a04578435825293850193908501906149eb565b606087015250939695505050505050565b602081526000612a0f6020830184613dda565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff618336030181126146c457600080fd5b803560028110613f8c57600080fd5b600060a08236031215614a7d57600080fd5b614a85613b47565b823567ffffffffffffffff80821115614a9d57600080fd5b614aa936838701613bff565b83526020850135915080821115614abf57600080fd5b50614acc36828601613bff565b602083015250604083013560048110614ae457600080fd5b6040820152614af560608401614a5c565b6060820152614b0660808401614528565b608082015292915050565b6000602080835260008454614b258161463d565b80848701526040600180841660008114614b465760018114614b7e57614bac565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614bac565b896000528660002060005b85811015614ba45781548b8201860152908301908801614b89565b8a0184019650505b509398975050505050505050565b8181038181111561047757610477614596565b600060208284031215614bdf57600080fd5b8151612a0f8161426d565b60ff818116838216019081111561047757610477614596565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614c3857600080fd5b83018035915067ffffffffffffffff821115614c5357600080fd5b602001915036819003821315610f8357600080fd5b67ffffffffffffffff831115614c8057614c80613aef565b614c9483614c8e835461463d565b83614740565b6000601f841160018114614ce65760008515614cb05750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614d7c565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614d355786850135825560209485019460019092019101614d15565b5086821015614d70577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff861115614deb57600080fd5b8560051b808860a0850137820182810360a09081016020850152614e1190820187613cf6565b91505063ffffffff8085166040840152808416606084015250969550505050505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"nodeCount\",\"type\":\"uint256\"}],\"name\":\"InvalidFaultTolerance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"InvalidNodeCapabilities\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeOperatorAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"InvalidNodeP2PId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lengthOne\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lengthTwo\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfCapabilitiesDON\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfWorkflowDON\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDeprecated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"name\":\"addCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"addDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"addNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"addNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"deprecateCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilities\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedId\",\"type\":\"bytes32\"}],\"name\":\"getCapability\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getCapabilityConfigs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"getHashedCapabilityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"getNode\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo\",\"name\":\"nodeInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"getNodeOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeOperators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodes\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"isCapabilityDeprecated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"donIds\",\"type\":\"uint32[]\"}],\"name\":\"removeDONs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"}],\"name\":\"removeNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"removedNodeP2PIds\",\"type\":\"bytes32[]\"}],\"name\":\"removeNodes\",\"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\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"updateNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052600e80546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6150bf80620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635e65e309116100ee5780638da5cb5b11610097578063d8bc7b6811610071578063d8bc7b68146103f6578063ddbe4f8214610409578063e29581aa1461041f578063f2fde38b1461043457600080fd5b80638da5cb5b1461039b5780639cb7c5f4146103c3578063d59a79f6146103e357600080fd5b806373ac22b4116100c857806373ac22b41461036d57806379ba50971461038057806386fa42461461038857600080fd5b80635e65e3091461033257806366acaa3314610345578063715f52951461035a57600080fd5b8063235374051161015b578063398f377311610135578063398f3773146102cb5780633f2a13c9146102de57806350c946fe146102ff5780635d83d9671461031f57600080fd5b80632353740514610285578063275459f2146102a55780632c01a1e8146102b857600080fd5b80631d05394c1161018c5780631d05394c1461023b578063214502431461025057806322bdbcbc1461026557600080fd5b80630fe5800a146101b357806312570011146101d9578063181f5a77146101fc575b600080fd5b6101c66101c1366004613ef4565b610447565b6040519081526020015b60405180910390f35b6101ec6101e7366004613f58565b61047b565b60405190151581526020016101d0565b604080518082018252601881527f4361706162696c697479526567697374727920312e302e300000000000000000602082015290516101d09190613fdf565b61024e610249366004614037565b610488565b005b6102586106ab565b6040516101d09190614197565b610278610273366004614230565b610810565b6040516101d09190614288565b610298610293366004614230565b6108fd565b6040516101d0919061429b565b61024e6102b3366004614037565b610941565b61024e6102c6366004614037565b610a18565b61024e6102d9366004614037565b610cbd565b6102f16102ec3660046142ae565b610e85565b6040516101d09291906142d8565b61031261030d366004613f58565b611071565b6040516101d09190614369565b61024e61032d366004614037565b61114b565b61024e610340366004614037565b611299565b61034d611718565b6040516101d0919061437c565b61024e610368366004614037565b611903565b61024e61037b366004614037565b6119be565b61024e611e9a565b61024e6103963660046143ef565b611f97565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d0565b6103d66103d1366004613f58565b6122dd565b6040516101d09190614517565b61024e6103f1366004614549565b6124e2565b61024e6104043660046145fe565b6125ab565b610411612675565b6040516101d09291906146a3565b6104276129d8565b6040516101d09190614733565b61024e6104423660046147ca565b612aea565b6000828260405160200161045c9291906142d8565b6040516020818303038152906040528051906020012090505b92915050565b6000610475600583612afe565b610490612b19565b60005b818110156106a65760008383838181106104af576104af6147e5565b90506020020160208101906104c49190614230565b63ffffffff8181166000908152600d60209081526040808320805464010000000081049095168085526001820190935290832094955093909290916a010000000000000000000090910460ff16905b61051c83612b9c565b8110156105c457811561057257600c60006105378584612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556105b4565b6105b28663ffffffff16600c60006105938588612ba690919063ffffffff16565b8152602001908152602001600020600401612bb290919063ffffffff16565b505b6105bd81614843565b9050610513565b508354640100000000900463ffffffff1660000361061b576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff861660048201526024015b60405180910390fd5b63ffffffff85166000818152600d6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000001690558051938452908301919091527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a150505050508061069f90614843565b9050610493565b505050565b600e54606090640100000000900463ffffffff1660006106cc60018361487b565b63ffffffff1667ffffffffffffffff8111156106ea576106ea613d8e565b60405190808252806020026020018201604052801561077157816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816107085790505b509050600060015b8363ffffffff168163ffffffff1610156107ed5763ffffffff8082166000908152600d602052604090205416156107dd576107b381612bbe565b8383815181106107c5576107c56147e5565b6020026020010181905250816107da90614843565b91505b6107e681614898565b9050610779565b506107f960018461487b565b63ffffffff168114610809578082525b5092915050565b60408051808201909152600081526060602082015263ffffffff82166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191610874906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546108a0906148bb565b80156108ed5780601f106108c2576101008083540402835291602001916108ed565b820191906000526020600020905b8154815290600101906020018083116108d057829003601f168201915b5050505050815250509050919050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c081019190915261047582612bbe565b610949612b19565b60005b63ffffffff81168211156106a657600083838363ffffffff16818110610974576109746147e5565b90506020020160208101906109899190614230565b63ffffffff81166000908152600b6020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681559192506109d46001830182613d21565b505060405163ffffffff8216907fa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a90600090a250610a1181614898565b905061094c565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb7576000848483818110610a5257610a526147e5565b602090810292909201356000818152600c90935260409092206001810154929350919050610aaf576040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260048101839052602401610612565b6000610abd82600401612b9c565b1115610b1257610ad06004820184612ba6565b6040517f60a6d89800000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260248101839052604401610612565b805468010000000000000000900463ffffffff1615610b7a5780546040517f60b9df730000000000000000000000000000000000000000000000000000000081526801000000000000000090910463ffffffff16600482015260248101839052604401610612565b83158015610bb45750805463ffffffff166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15610bed576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6001810154610bfe90600790612bb2565b506002810154610c1090600990612bb2565b506000828152600c6020526040812080547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815560018101829055600281018290559060048201818181610c658282613d5b565b5050505050507f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320582604051610c9c91815260200190565b60405180910390a1505080610cb090614843565b9050610a36565b50505050565b610cc5612b19565b60005b818110156106a6576000838383818110610ce457610ce46147e5565b9050602002810190610cf6919061490e565b610cff9061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16610d50576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e54604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600b909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610ddc9082614a04565b5050600e8054909150600090610df79063ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff168163ffffffff167f78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e8460200151604051610e6a9190613fdf565b60405180910390a3505080610e7e90614843565b9050610cc8565b63ffffffff8083166000908152600d60209081526040808320805464010000000090049094168084526001909401825280832085845260030190915281208054606093849390929091610ed7906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610f03906148bb565b8015610f505780601f10610f2557610100808354040283529160200191610f50565b820191906000526020600020905b815481529060010190602001808311610f3357829003601f168201915b5050506000888152600260208190526040909120015492935060609262010000900473ffffffffffffffffffffffffffffffffffffffff16159150611063905057600086815260026020819052604091829020015490517f8318ed5d00000000000000000000000000000000000000000000000000000000815263ffffffff891660048201526201000090910473ffffffffffffffffffffffffffffffffffffffff1690638318ed5d90602401600060405180830381865afa15801561101a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526110609190810190614b1e565b90505b9093509150505b9250929050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c08101919091526040805160e0810182526000848152600c6020908152838220805463ffffffff8082168652640100000000820481168487018190526801000000000000000090920416858701526001820154606086015260028201546080860152835260030190529190912060a082019061112090612e92565b8152602001611143600c6000868152602001908152602001600020600401612e92565b905292915050565b611153612b19565b60005b818110156106a6576000838383818110611172576111726147e5565b90506020020135905061118f816003612afe90919063ffffffff16565b6111c8576040517fe181733f00000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6111d3600582612e9f565b61120c576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6000818152600260205260408120906112258282613d21565b611233600183016000613d21565b5060020180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a25061129281614843565b9050611156565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106112d3576112d36147e5565b90506020028101906112e59190614b8c565b6112ee90614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611344906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611370906148bb565b80156113bd5780601f10611392576101008083540402835291602001916113bd565b820191906000526020600020905b8154815290600101906020018083116113a057829003601f168201915b5050505050815250509050831580156113ed5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611426576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015461147a5782604001516040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301516114b5576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154602084015181146115365760208401516114d690600790612afe565b1561150d576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208401516001830155611522600782612bb2565b50602084015161153490600790612e9f565b505b6060840151805160000361157857806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b8254600090849060049061159990640100000000900463ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff1602179055905060005b8251811015611686576115f18382815181106115d9576115d96147e5565b60200260200101516003612afe90919063ffffffff16565b61162957826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b61167583828151811061163e5761163e6147e5565b60200260200101518660030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b5061167f81614843565b90506115bb565b50855184547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9091169081178555604080880151600287018190556020808a01518351928352908201527f4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b910160405180910390a25050505050508061171190614843565b90506112b7565b600e5460609063ffffffff16600061173160018361487b565b63ffffffff1667ffffffffffffffff81111561174f5761174f613d8e565b60405190808252806020026020018201604052801561179557816020015b60408051808201909152600081526060602082015281526020019060019003908161176d5790505b509050600060015b8363ffffffff168163ffffffff1610156118ed5763ffffffff81166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16156118dd5763ffffffff81166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191611831906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461185d906148bb565b80156118aa5780601f1061187f576101008083540402835291602001916118aa565b820191906000526020600020905b81548152906001019060200180831161188d57829003601f168201915b5050505050815250508383815181106118c5576118c56147e5565b6020026020010181905250816118da90614843565b91505b6118e681614898565b905061179d565b50600e546107f99060019063ffffffff1661487b565b61190b612b19565b60005b818110156106a657600083838381811061192a5761192a6147e5565b905060200281019061193c9190614ca6565b61194590614ce9565b9050600061195b82600001518360200151610447565b9050611968600382612e9f565b6119a1576040517febf5255100000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6119ab8183612eab565b5050806119b790614843565b905061190e565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106119f8576119f86147e5565b9050602002810190611a0a9190614b8c565b611a1390614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611a69906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611a95906148bb565b8015611ae25780601f10611ab757610100808354040283529160200191611ae2565b820191906000526020600020905b815481529060010190602001808311611ac557829003601f168201915b50505091909252505081519192505073ffffffffffffffffffffffffffffffffffffffff16611b485781516040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff9091166004820152602401610612565b83158015611b6d5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611ba6576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015415611bfb5782604001516040517f5461848300000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b6040830151611c3e5782604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301511580611c5b57506020830151611c5b90600790612afe565b15611c92576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608301518051600003611cd457806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b81548290600490611cf290640100000000900463ffffffff16614898565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041660005b8251811015611dd057611d3b8382815181106115d9576115d96147e5565b611d7357826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b611dbf838281518110611d8857611d886147e5565b60200260200101518560030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b50611dc981614843565b9050611d1d565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff91821617845560408601516002850155602086015160018501819055611e269160079190612e9f16565b506040850151611e3890600990612e9f565b50845160408087015160208089015183519283529082015263ffffffff909216917f74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05910160405180910390a2505050505080611e9390614843565b90506119dc565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610612565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b828114611fda576040517fab8b67c60000000000000000000000000000000000000000000000000000000081526004810184905260248101829052604401610612565b6000805473ffffffffffffffffffffffffffffffffffffffff16905b848110156122d5576000868683818110612012576120126147e5565b90506020020160208101906120279190614230565b63ffffffff81166000908152600b6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff16612096576040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152602401610612565b60008686858181106120aa576120aa6147e5565b90506020028101906120bc919061490e565b6120c59061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16612116576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16331480159061215357503373ffffffffffffffffffffffffffffffffffffffff861614155b1561218c576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b8051825473ffffffffffffffffffffffffffffffffffffffff908116911614158061220857506020808201516040516121c59201613fdf565b60405160208183030381529060405280519060200120826001016040516020016121ef9190614d8f565b6040516020818303038152906040528051906020012014155b156122c157805182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602081015160018301906122629082614a04565b50806000015173ffffffffffffffffffffffffffffffffffffffff168363ffffffff167f86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a2883602001516040516122b89190613fdf565b60405180910390a35b505050806122ce90614843565b9050611ff6565b505050505050565b61230d6040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b60008281526002602052604090819020815160a08101909252805482908290612335906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612361906148bb565b80156123ae5780601f10612383576101008083540402835291602001916123ae565b820191906000526020600020905b81548152906001019060200180831161239157829003601f168201915b505050505081526020016001820180546123c7906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546123f3906148bb565b80156124405780601f1061241557610100808354040283529160200191612440565b820191906000526020600020905b81548152906001019060200180831161242357829003601f168201915b5050509183525050600282015460209091019060ff1660038111156124675761246761445b565b60038111156124785761247861445b565b81526020016002820160019054906101000a900460ff1660018111156124a0576124a061445b565b60018111156124b1576124b161445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b6124ea612b19565b63ffffffff8089166000908152600d602052604081205464010000000090049091169081900361254e576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a166004820152602401610612565b6125a0888888886040518060a001604052808f63ffffffff1681526020018761257690614898565b97508763ffffffff1681526020018a1515815260200189151581526020018860ff1681525061313f565b505050505050505050565b6125b3612b19565b600e805460009164010000000090910463ffffffff169060046125d583614898565b82546101009290920a63ffffffff81810219909316918316021790915581166000818152600d602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a08101835292835260019083015286151590820152841515606082015260ff8416608082015290915061266b90899089908990899061313f565b5050505050505050565b6060806126826003612e92565b915060006126906005612b9c565b835161269c9190614e38565b90508067ffffffffffffffff8111156126b7576126b7613d8e565b60405190808252806020026020018201604052801561271857816020015b6127056040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b8152602001906001900390816126d55790505b50915060008167ffffffffffffffff81111561273657612736613d8e565b60405190808252806020026020018201604052801561275f578160200160208202803683370190505b5090506000805b85518110156129ce576000868281518110612783576127836147e5565b602002602001015190506127a1816005612afe90919063ffffffff16565b6129bd5760008181526002602052604090819020815160a081019092528054829082906127cd906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546127f9906148bb565b80156128465780601f1061281b57610100808354040283529160200191612846565b820191906000526020600020905b81548152906001019060200180831161282957829003601f168201915b5050505050815260200160018201805461285f906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461288b906148bb565b80156128d85780601f106128ad576101008083540402835291602001916128d8565b820191906000526020600020905b8154815290600101906020018083116128bb57829003601f168201915b5050509183525050600282015460209091019060ff1660038111156128ff576128ff61445b565b60038111156129105761291061445b565b81526020016002820160019054906101000a900460ff1660018111156129385761293861445b565b60018111156129495761294961445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff166020909101528651879085908110612988576129886147e5565b6020026020010181905250808484815181106129a6576129a66147e5565b60209081029190910101526129ba83614843565b92505b506129c781614843565b9050612766565b5090949293505050565b606060006129e66009612e92565b90506000815167ffffffffffffffff811115612a0457612a04613d8e565b604051908082528060200260200182016040528015612a8b57816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181612a225790505b50905060005b825181101561080957612abc838281518110612aaf57612aaf6147e5565b6020026020010151611071565b828281518110612ace57612ace6147e5565b602002602001018190525080612ae390614843565b9050612a91565b612af2612b19565b612afb81613983565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610612565b565b6000610475825490565b6000612b128383613a78565b6000612b128383613aa2565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff8581168352600d8252848320805464010000000090049091168084526001909101825284832060028101805487518186028101860190985280885295969295919493909190830182828015612c6f57602002820191906000526020600020905b815481526020019060010190808311612c5b575b505050505090506000815167ffffffffffffffff811115612c9257612c92613d8e565b604051908082528060200260200182016040528015612cd857816020015b604080518082019091526000815260606020820152815260200190600190039081612cb05790505b50905060005b8151811015612df9576040518060400160405280848381518110612d0457612d046147e5565b60200260200101518152602001856003016000868581518110612d2957612d296147e5565b602002602001015181526020019081526020016000208054612d4a906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612d76906148bb565b8015612dc35780601f10612d9857610100808354040283529160200191612dc3565b820191906000526020600020905b815481529060010190602001808311612da657829003601f168201915b5050505050815250828281518110612ddd57612ddd6147e5565b602002602001018190525080612df290614843565b9050612cde565b506040805160e08101825263ffffffff8089166000818152600d6020818152868320548086168752948b168187015260ff680100000000000000008604811697870197909752690100000000000000000085048716151560608701529290915290526a010000000000000000000090049091161515608082015260a08101612e8085612e92565b81526020019190915295945050505050565b60606000612b1283613b95565b6000612b128383613bf1565b608081015173ffffffffffffffffffffffffffffffffffffffff1615612ff957608081015173ffffffffffffffffffffffffffffffffffffffff163b1580612fa4575060808101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f78bea72100000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff909116906301ffc9a790602401602060405180830381865afa158015612f7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa29190614e4b565b155b15612ff95760808101516040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610612565b6000828152600260205260409020815182919081906130189082614a04565b506020820151600182019061302d9082614a04565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600183600381111561306f5761306f61445b565b021790555060608201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360018111156130b6576130b661445b565b0217905550608091909101516002909101805473ffffffffffffffffffffffffffffffffffffffff90921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405182907f04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae90600090a25050565b805163ffffffff9081166000908152600d602090815260408083208286015190941683526001909301905220608082015160ff16158061319157506080820151859061318c906001614e68565b60ff16115b156131da5760808201516040517f25b4d61800000000000000000000000000000000000000000000000000000000815260ff909116600482015260248101869052604401610612565b6001826020015163ffffffff1611156132ca57815163ffffffff166000908152600d60209081526040822090840151600191820191839161321b919061487b565b63ffffffff1663ffffffff168152602001908152602001600020905060005b61324382612b9c565b8110156132c757613272846000015163ffffffff16600c60006105938587600001612ba690919063ffffffff16565b50600c60006132818484612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556132c081614843565b905061323a565b50505b60005b8581101561350c576132fa8787838181106132ea576132ea6147e5565b8592602090910201359050612e9f565b61335b578251878783818110613312576133126147e5565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8260600151156134b257825163ffffffff16600c6000898985818110613383576133836147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff16148015906133fd5750600c60008888848181106133ce576133ce6147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff1615155b1561345f578251878783818110613416576134166147e5565b6040517f60b9df7300000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8251600c6000898985818110613477576134776147e5565b90506020020135815260200190815260200160002060000160086101000a81548163ffffffff021916908363ffffffff1602179055506134fc565b82516134fa9063ffffffff16600c60008a8a868181106134d4576134d46147e5565b905060200201358152602001908152602001600020600401612e9f90919063ffffffff16565b505b61350581614843565b90506132cd565b5060005b838110156137f8573685858381811061352b5761352b6147e5565b905060200281019061353d919061490e565b905061354b60038235612afe565b613584576040517fe181733f00000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b61359060058235612afe565b156135ca576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b80356000908152600384016020526040812080546135e7906148bb565b905011156136335783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015281356024820152604401610612565b60005b87811015613745576136da8235600c60008c8c86818110613659576136596147e5565b9050602002013581526020019081526020016000206003016000600c60008e8e88818110613689576136896147e5565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020612afe90919063ffffffff16565b613735578888828181106136f0576136f06147e5565b6040517fa7e792500000000000000000000000000000000000000000000000000000000081526020909102929092013560048301525082356024820152604401610612565b61373e81614843565b9050613636565b506002830180546001810182556000918252602091829020833591015561376e90820182614e81565b8235600090815260038601602052604090209161378c919083614ee6565b5083516020808601516137e792918435908c908c906137ad90880188614e81565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613c4092505050565b506137f181614843565b9050613510565b50604080830151835163ffffffff9081166000908152600d602090815284822080549415156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff90951694909417909355606086015186518316825284822080549115156a0100000000000000000000027fffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffff9092169190911790556080860151865183168252848220805460ff9290921668010000000000000000027fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c158170365192613973929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613a02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610612565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110613a8f57613a8f6147e5565b9060005260206000200154905092915050565b60008181526001830160205260408120548015613b8b576000613ac6600183614e38565b8554909150600090613ada90600190614e38565b9050818114613b3f576000866000018281548110613afa57613afa6147e5565b9060005260206000200154905080876000018481548110613b1d57613b1d6147e5565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b5057613b50615001565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610475565b6000915050610475565b606081600001805480602002602001604051908101604052809291908181526020018280548015613be557602002820191906000526020600020905b815481526020019060010190808311613bd1575b50505050509050919050565b6000818152600183016020526040812054613c3857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610475565b506000610475565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff16156122d557600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c90613ce7908690869086908b908d90600401615030565b600060405180830381600087803b158015613d0157600080fd5b505af1158015613d15573d6000803e3d6000fd5b50505050505050505050565b508054613d2d906148bb565b6000825580601f10613d3d575050565b601f016020900490600052602060002090810190612afb9190613d75565b5080546000825590600052602060002090810190612afb91905b5b80821115613d8a5760008155600101613d76565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715613de057613de0613d8e565b60405290565b60405160a0810167ffffffffffffffff81118282101715613de057613de0613d8e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613e5057613e50613d8e565b604052919050565b600067ffffffffffffffff821115613e7257613e72613d8e565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613eaf57600080fd5b8135613ec2613ebd82613e58565b613e09565b818152846020838601011115613ed757600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613f0757600080fd5b823567ffffffffffffffff80821115613f1f57600080fd5b613f2b86838701613e9e565b93506020850135915080821115613f4157600080fd5b50613f4e85828601613e9e565b9150509250929050565b600060208284031215613f6a57600080fd5b5035919050565b60005b83811015613f8c578181015183820152602001613f74565b50506000910152565b60008151808452613fad816020860160208601613f71565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612b126020830184613f95565b60008083601f84011261400457600080fd5b50813567ffffffffffffffff81111561401c57600080fd5b6020830191508360208260051b850101111561106a57600080fd5b6000806020838503121561404a57600080fd5b823567ffffffffffffffff81111561406157600080fd5b61406d85828601613ff2565b90969095509350505050565b600081518084526020808501945080840160005b838110156140a95781518752958201959082019060010161408d565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b8581101561411057828403895281518051855285015160408686018190526140fc81870183613f95565b9a87019a95505050908401906001016140d2565b5091979650505050505050565b600063ffffffff8083511684528060208401511660208501525060ff604083015116604084015260608201511515606084015260808201511515608084015260a082015160e060a085015261417560e0850182614079565b905060c083015184820360c086015261418e82826140b4565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526141f885835161411d565b945092850192908501906001016141be565b5092979650505050505050565b803563ffffffff8116811461422b57600080fd5b919050565b60006020828403121561424257600080fd5b612b1282614217565b73ffffffffffffffffffffffffffffffffffffffff815116825260006020820151604060208501526142806040850182613f95565b949350505050565b602081526000612b12602083018461424b565b602081526000612b12602083018461411d565b600080604083850312156142c157600080fd5b6142ca83614217565b946020939093013593505050565b6040815260006142eb6040830185613f95565b828103602084015261418e8185613f95565b600063ffffffff80835116845280602084015116602085015280604084015116604085015250606082015160608401526080820151608084015260a082015160e060a085015261435060e0850182614079565b905060c083015184820360c086015261418e8282614079565b602081526000612b1260208301846142fd565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526143dd85835161424b565b945092850192908501906001016143a3565b6000806000806040858703121561440557600080fd5b843567ffffffffffffffff8082111561441d57600080fd5b61442988838901613ff2565b9096509450602087013591508082111561444257600080fd5b5061444f87828801613ff2565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160a0845261449f60a0850182613f95565b9050602083015184820360208601526144b88282613f95565b9150506040830151600481106144d0576144d061445b565b60408501526060830151600281106144ea576144ea61445b565b606085015260809283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b602081526000612b12602083018461448a565b8015158114612afb57600080fd5b803560ff8116811461422b57600080fd5b60008060008060008060008060c0898b03121561456557600080fd5b61456e89614217565b9750602089013567ffffffffffffffff8082111561458b57600080fd5b6145978c838d01613ff2565b909950975060408b01359150808211156145b057600080fd5b506145bd8b828c01613ff2565b90965094505060608901356145d18161452a565b925060808901356145e18161452a565b91506145ef60a08a01614538565b90509295985092959890939650565b600080600080600080600060a0888a03121561461957600080fd5b873567ffffffffffffffff8082111561463157600080fd5b61463d8b838c01613ff2565b909950975060208a013591508082111561465657600080fd5b506146638a828b01613ff2565b90965094505060408801356146778161452a565b925060608801356146878161452a565b915061469560808901614538565b905092959891949750929550565b6040815260006146b66040830185614079565b6020838203818501528185518084528284019150828160051b85010183880160005b83811015614724577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087840301855261471283835161448a565b948601949250908501906001016146d8565b50909998505050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526147948583516142fd565b9450928501929085019060010161475a565b803573ffffffffffffffffffffffffffffffffffffffff8116811461422b57600080fd5b6000602082840312156147dc57600080fd5b612b12826147a6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361487457614874614814565b5060010190565b63ffffffff82811682821603908082111561080957610809614814565b600063ffffffff8083168181036148b1576148b1614814565b6001019392505050565b600181811c908216806148cf57607f821691505b602082108103614908577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261494257600080fd5b9190910192915050565b60006040823603121561495e57600080fd5b6040516040810167ffffffffffffffff828210818311171561498257614982613d8e565b8160405261498f856147a6565b835260208501359150808211156149a557600080fd5b506149b236828601613e9e565b60208301525092915050565b601f8211156106a657600081815260208120601f850160051c810160208610156149e55750805b601f850160051c820191505b818110156122d5578281556001016149f1565b815167ffffffffffffffff811115614a1e57614a1e613d8e565b614a3281614a2c84546148bb565b846149be565b602080601f831160018114614a855760008415614a4f5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556122d5565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015614ad257888601518255948401946001909101908401614ab3565b5085821015614b0e57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614b3057600080fd5b815167ffffffffffffffff811115614b4757600080fd5b8201601f81018413614b5857600080fd5b8051614b66613ebd82613e58565b818152856020838501011115614b7b57600080fd5b61418e826020830160208601613f71565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261494257600080fd5b600060808236031215614bd257600080fd5b614bda613dbd565b614be383614217565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff80821115614c1457600080fd5b9085019036601f830112614c2757600080fd5b813581811115614c3957614c39613d8e565b8060051b9150614c4a848301613e09565b8181529183018401918481019036841115614c6457600080fd5b938501935b83851015614c8257843582529385019390850190614c69565b606087015250939695505050505050565b602081526000612b126020830184614079565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6183360301811261494257600080fd5b80356002811061422b57600080fd5b600060a08236031215614cfb57600080fd5b614d03613de6565b823567ffffffffffffffff80821115614d1b57600080fd5b614d2736838701613e9e565b83526020850135915080821115614d3d57600080fd5b50614d4a36828601613e9e565b602083015250604083013560048110614d6257600080fd5b6040820152614d7360608401614cda565b6060820152614d84608084016147a6565b608082015292915050565b6000602080835260008454614da3816148bb565b80848701526040600180841660008114614dc45760018114614dfc57614e2a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614e2a565b896000528660002060005b85811015614e225781548b8201860152908301908801614e07565b8a0184019650505b509398975050505050505050565b8181038181111561047557610475614814565b600060208284031215614e5d57600080fd5b8151612b128161452a565b60ff818116838216019081111561047557610475614814565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614eb657600080fd5b83018035915067ffffffffffffffff821115614ed157600080fd5b60200191503681900382131561106a57600080fd5b67ffffffffffffffff831115614efe57614efe613d8e565b614f1283614f0c83546148bb565b836149be565b6000601f841160018114614f645760008515614f2e5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614ffa565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614fb35786850135825560209485019460019092019101614f93565b5086821015614fee577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86111561506957600080fd5b8560051b808860a0850137820182810360a0908101602085015261508f90820187613f95565b91505063ffffffff8085166040840152808416606084015250969550505050505056fea164736f6c6343000813000a", } var CapabilityRegistryABI = CapabilityRegistryMetaData.ABI @@ -347,26 +357,25 @@ func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetHashedCapabilityI return _CapabilityRegistry.Contract.GetHashedCapabilityId(&_CapabilityRegistry.CallOpts, labelledName, version) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilityRegistryNodeInfo, uint32, error) { +func (_CapabilityRegistry *CapabilityRegistryCaller) GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilityRegistryNodeInfo, error) { var out []interface{} err := _CapabilityRegistry.contract.Call(opts, &out, "getNode", p2pId) if err != nil { - return *new(CapabilityRegistryNodeInfo), *new(uint32), err + return *new(CapabilityRegistryNodeInfo), err } out0 := *abi.ConvertType(out[0], new(CapabilityRegistryNodeInfo)).(*CapabilityRegistryNodeInfo) - out1 := *abi.ConvertType(out[1], new(uint32)).(*uint32) - return out0, out1, err + return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetNode(p2pId [32]byte) (CapabilityRegistryNodeInfo, uint32, error) { +func (_CapabilityRegistry *CapabilityRegistrySession) GetNode(p2pId [32]byte) (CapabilityRegistryNodeInfo, error) { return _CapabilityRegistry.Contract.GetNode(&_CapabilityRegistry.CallOpts, p2pId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNode(p2pId [32]byte) (CapabilityRegistryNodeInfo, uint32, error) { +func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNode(p2pId [32]byte) (CapabilityRegistryNodeInfo, error) { return _CapabilityRegistry.Contract.GetNode(&_CapabilityRegistry.CallOpts, p2pId) } @@ -414,33 +423,25 @@ func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNodeOperators() ( return _CapabilityRegistry.Contract.GetNodeOperators(&_CapabilityRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetNodes(opts *bind.CallOpts) (GetNodes, - - error) { +func (_CapabilityRegistry *CapabilityRegistryCaller) GetNodes(opts *bind.CallOpts) ([]CapabilityRegistryNodeInfo, error) { var out []interface{} err := _CapabilityRegistry.contract.Call(opts, &out, "getNodes") - outstruct := new(GetNodes) if err != nil { - return *outstruct, err + return *new([]CapabilityRegistryNodeInfo), err } - outstruct.NodeInfo = *abi.ConvertType(out[0], new([]CapabilityRegistryNodeInfo)).(*[]CapabilityRegistryNodeInfo) - outstruct.ConfigCounts = *abi.ConvertType(out[1], new([]uint32)).(*[]uint32) + out0 := *abi.ConvertType(out[0], new([]CapabilityRegistryNodeInfo)).(*[]CapabilityRegistryNodeInfo) - return *outstruct, err + return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetNodes() (GetNodes, - - error) { +func (_CapabilityRegistry *CapabilityRegistrySession) GetNodes() ([]CapabilityRegistryNodeInfo, error) { return _CapabilityRegistry.Contract.GetNodes(&_CapabilityRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNodes() (GetNodes, - - error) { +func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNodes() ([]CapabilityRegistryNodeInfo, error) { return _CapabilityRegistry.Contract.GetNodes(&_CapabilityRegistry.CallOpts) } @@ -558,15 +559,15 @@ func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddNodeOperators return _CapabilityRegistry.Contract.AddNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AddNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeInfo) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistryTransactor) AddNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { return _CapabilityRegistry.contract.Transact(opts, "addNodes", nodes) } -func (_CapabilityRegistry *CapabilityRegistrySession) AddNodes(nodes []CapabilityRegistryNodeInfo) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistrySession) AddNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { return _CapabilityRegistry.Contract.AddNodes(&_CapabilityRegistry.TransactOpts, nodes) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddNodes(nodes []CapabilityRegistryNodeInfo) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { return _CapabilityRegistry.Contract.AddNodes(&_CapabilityRegistry.TransactOpts, nodes) } @@ -654,15 +655,15 @@ func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateNodeOperat return _CapabilityRegistry.Contract.UpdateNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeInfo) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { return _CapabilityRegistry.contract.Transact(opts, "updateNodes", nodes) } -func (_CapabilityRegistry *CapabilityRegistrySession) UpdateNodes(nodes []CapabilityRegistryNodeInfo) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistrySession) UpdateNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { return _CapabilityRegistry.Contract.UpdateNodes(&_CapabilityRegistry.TransactOpts, nodes) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateNodes(nodes []CapabilityRegistryNodeInfo) (*types.Transaction, error) { +func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { return _CapabilityRegistry.Contract.UpdateNodes(&_CapabilityRegistry.TransactOpts, nodes) } @@ -2090,10 +2091,6 @@ type GetCapabilities struct { HashedCapabilityIds [][32]byte Capabilities []CapabilityRegistryCapability } -type GetNodes struct { - NodeInfo []CapabilityRegistryNodeInfo - ConfigCounts []uint32 -} func (_CapabilityRegistry *CapabilityRegistry) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { @@ -2188,15 +2185,13 @@ type CapabilityRegistryInterface interface { GetHashedCapabilityId(opts *bind.CallOpts, labelledName string, version string) ([32]byte, error) - GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilityRegistryNodeInfo, uint32, error) + GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilityRegistryNodeInfo, error) GetNodeOperator(opts *bind.CallOpts, nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) GetNodeOperators(opts *bind.CallOpts) ([]CapabilityRegistryNodeOperator, error) - GetNodes(opts *bind.CallOpts) (GetNodes, - - error) + GetNodes(opts *bind.CallOpts) ([]CapabilityRegistryNodeInfo, error) IsCapabilityDeprecated(opts *bind.CallOpts, hashedCapabilityId [32]byte) (bool, error) @@ -2212,7 +2207,7 @@ type CapabilityRegistryInterface interface { AddNodeOperators(opts *bind.TransactOpts, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) - AddNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeInfo) (*types.Transaction, error) + AddNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) DeprecateCapabilities(opts *bind.TransactOpts, hashedCapabilityIds [][32]byte) (*types.Transaction, error) @@ -2228,7 +2223,7 @@ type CapabilityRegistryInterface interface { UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) - UpdateNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeInfo) (*types.Transaction, error) + UpdateNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) FilterCapabilityConfigured(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityConfiguredIterator, error) diff --git a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt index eca45db5753..e2a844c7b79 100644 --- a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -1,4 +1,4 @@ GETH_VERSION: 1.13.8 forwarder: ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin bd15b7c5cecc87d44cac0b8414627cfb2c0e1cdd554df60a50dcb682f9a05129 -keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin cc978f3a11c405f0559cf1d371ed8a1553d9b9975e8b3915a142cc781d280823 +keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin c1e609950ee768884ba5ecd0ad8b998570d46e1c7ac281294e677e908113a6b7 ocr3_capability: ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin 144f23145878b95d1672e4919874eddeeaa38ce520d0edbe72c6677e39bb4741 From 290c94f22aadb3ca82fa9c0b7b5f2c82f06f974f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deividas=20Kar=C5=BEinauskas?= Date: Mon, 17 Jun 2024 18:57:09 +0300 Subject: [PATCH 03/14] Mark TestIntegration_KeeperPluginBasic as a flake (#13575) --- core/services/ocr2/plugins/ocr2keeper/integration_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/services/ocr2/plugins/ocr2keeper/integration_test.go b/core/services/ocr2/plugins/ocr2keeper/integration_test.go index 1c9c6025391..2ce9ff3d243 100644 --- a/core/services/ocr2/plugins/ocr2keeper/integration_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/integration_test.go @@ -201,6 +201,11 @@ func getUpkeepIdFromTx(t *testing.T, registry *keeper_registry_wrapper2_0.Keeper } func TestIntegration_KeeperPluginBasic(t *testing.T) { + testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/AUTO-11072") + runKeeperPluginBasic(t) +} + +func runKeeperPluginBasic(t *testing.T) { g := gomega.NewWithT(t) lggr := logger.TestLogger(t) From b5c25ea051af41280b0668ec3f9a61f13d135ad7 Mon Sep 17 00:00:00 2001 From: Tate Date: Mon, 17 Jun 2024 10:34:14 -0600 Subject: [PATCH 04/14] [TT-1267] test-base-image image being rebuilt when it already exists for tags (#13519) Co-authored-by: Bartek Tofel --- .github/actions/build-test-image/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-test-image/action.yml b/.github/actions/build-test-image/action.yml index dc80b485193..dfe31f639f4 100644 --- a/.github/actions/build-test-image/action.yml +++ b/.github/actions/build-test-image/action.yml @@ -73,7 +73,7 @@ runs: id: check-base-image uses: smartcontractkit/chainlink-github-actions/docker/image-exists@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 with: - repository: ${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/test-base-image + repository: test-base-image tag: ${{ steps.long_sha.outputs.long_sha }} AWS_REGION: ${{ inputs.QA_AWS_REGION }} AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }} From 0d4a3b2cd8ff938ba018d982ef514c754a7df345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deividas=20Kar=C5=BEinauskas?= Date: Mon, 17 Jun 2024 21:09:43 +0300 Subject: [PATCH 05/14] CapabilityRegistry => CapabilitiesRegistry (#13580) * CapabilityRegistry => CapabilitiesRegistry * Edit generated wrappers * Add changesets --- .changeset/lemon-buttons-raise.md | 5 + contracts/.changeset/spicy-mirrors-care.md | 5 + contracts/gas-snapshots/keystone.gas-snapshot | 162 +-- .../scripts/native_solc_compile_all_keystone | 2 +- ...yRegistry.sol => CapabilitiesRegistry.sol} | 14 +- .../interfaces/ICapabilityConfiguration.sol | 2 +- .../src/v0.8/keystone/test/BaseTest.t.sol | 44 +- ...ilitiesRegistry_AddCapabilitiesTest.t.sol} | 48 +- ... => CapabilitiesRegistry_AddDONTest.t.sol} | 130 ++- ...litiesRegistry_AddNodeOperatorsTest.t.sol} | 22 +- ...> CapabilitiesRegistry_AddNodesTest.t.sol} | 100 +- ...sRegistry_DeprecateCapabilitiesTest.t.sol} | 36 +- ...ilitiesRegistry_GetCapabilitiesTest.t.sol} | 34 +- ...=> CapabilitiesRegistry_GetDONsTest.t.sol} | 32 +- ...sRegistry_GetHashedCapabilityIdTest.t.sol} | 10 +- ...litiesRegistry_GetNodeOperatorsTest.t.sol} | 12 +- ...> CapabilitiesRegistry_GetNodesTest.t.sol} | 24 +- ...CapabilitiesRegistry_RemoveDONsTest.t.sol} | 42 +- ...iesRegistry_RemoveNodeOperatorsTest.t.sol} | 18 +- ...apabilitiesRegistry_RemoveNodesTest.t.sol} | 102 +- ...bilitiesRegistry_TypeAndVersionTest.t.sol} | 4 +- ... CapabilitiesRegistry_UpdateDONTest.t.sol} | 120 +- ...tiesRegistry_UpdateNodeOperatorsTest.t.sol | 104 ++ ...apabilitiesRegistry_UpdateNodesTest.t.sol} | 108 +- ...lityRegistry_UpdateNodeOperatorsTest.t.sol | 90 -- core/capabilities/reader.go | 30 +- core/capabilities/reader_test.go | 28 +- core/capabilities/registry.go | 2 +- core/capabilities/syncer.go | 24 +- core/capabilities/syncer_test.go | 36 +- .../capabilities_registry.go} | 1034 ++++++++--------- ...rapper-dependency-versions-do-not-edit.txt | 2 +- core/gethwrappers/keystone/go_generate.go | 2 +- .../standard_capabilities.go | 40 +- 34 files changed, 1252 insertions(+), 1216 deletions(-) create mode 100644 .changeset/lemon-buttons-raise.md create mode 100644 contracts/.changeset/spicy-mirrors-care.md rename contracts/src/v0.8/keystone/{CapabilityRegistry.sol => CapabilitiesRegistry.sol} (98%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_AddCapabilitiesTest.t.sol => CapabilitiesRegistry_AddCapabilitiesTest.t.sol} (60%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_AddDONTest.t.sol => CapabilitiesRegistry_AddDONTest.t.sol} (50%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_AddNodeOperatorsTest.t.sol => CapabilitiesRegistry_AddNodeOperatorsTest.t.sol} (56%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_AddNodesTest.t.sol => CapabilitiesRegistry_AddNodesTest.t.sol} (61%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_DeprecateCapabilitiesTest.t.sol => CapabilitiesRegistry_DeprecateCapabilitiesTest.t.sol} (54%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_GetCapabilitiesTest.t.sol => CapabilitiesRegistry_GetCapabilitiesTest.t.sol} (65%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_GetDONsTest.t.sol => CapabilitiesRegistry_GetDONsTest.t.sol} (69%) rename contracts/src/v0.8/keystone/test/{CapabiityRegistry_GetHashedCapabilityIdTest.t.sol => CapabilitiesRegistry_GetHashedCapabilityIdTest.t.sol} (61%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_GetNodeOperatorsTest.t.sol => CapabilitiesRegistry_GetNodeOperatorsTest.t.sol} (70%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_GetNodesTest.t.sol => CapabilitiesRegistry_GetNodesTest.t.sol} (75%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_RemoveDONsTest.t.sol => CapabilitiesRegistry_RemoveDONsTest.t.sol} (58%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_RemoveNodeOperatorsTest.t.sol => CapabilitiesRegistry_RemoveNodeOperatorsTest.t.sol} (61%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_RemoveNodesTest.t.sol => CapabilitiesRegistry_RemoveNodesTest.t.sol} (58%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_TypeAndVersionTest.t.sol => CapabilitiesRegistry_TypeAndVersionTest.t.sol} (51%) rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_UpdateDONTest.t.sol => CapabilitiesRegistry_UpdateDONTest.t.sol} (51%) create mode 100644 contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodeOperatorsTest.t.sol rename contracts/src/v0.8/keystone/test/{CapabilityRegistry_UpdateNodesTest.t.sol => CapabilitiesRegistry_UpdateNodesTest.t.sol} (61%) delete mode 100644 contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodeOperatorsTest.t.sol rename core/gethwrappers/keystone/generated/{keystone_capability_registry/keystone_capability_registry.go => capabilities_registry/capabilities_registry.go} (55%) diff --git a/.changeset/lemon-buttons-raise.md b/.changeset/lemon-buttons-raise.md new file mode 100644 index 00000000000..0408383bd03 --- /dev/null +++ b/.changeset/lemon-buttons-raise.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal diff --git a/contracts/.changeset/spicy-mirrors-care.md b/contracts/.changeset/spicy-mirrors-care.md new file mode 100644 index 00000000000..93fba83b558 --- /dev/null +++ b/contracts/.changeset/spicy-mirrors-care.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +#internal diff --git a/contracts/gas-snapshots/keystone.gas-snapshot b/contracts/gas-snapshots/keystone.gas-snapshot index f641bcb065e..55e6884c818 100644 --- a/contracts/gas-snapshots/keystone.gas-snapshot +++ b/contracts/gas-snapshots/keystone.gas-snapshot @@ -1,84 +1,84 @@ -CapabilityRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 152156) -CapabilityRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 176137) -CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 24723) -CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 145769) -CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 94606) -CapabilityRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 92961) -CapabilityRegistry_AddDONTest:test_AddDON() (gas: 372909) -CapabilityRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19269) -CapabilityRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 169874) -CapabilityRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 243042) -CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 249901) -CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 116949) -CapabilityRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43354) -CapabilityRegistry_AddDONTest:test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() (gas: 344231) -CapabilityRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 180335) -CapabilityRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 184333) -CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17602) -CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 18498) -CapabilityRegistry_AddNodesTest:test_AddsNodeParams() (gas: 358667) -CapabilityRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 358633) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301350) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55207) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24895) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27702) -CapabilityRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25108) -CapabilityRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27408) -CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27047) -CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309800) -CapabilityRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 92938) -CapabilityRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 93066) -CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 22944) -CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 16231) -CapabilityRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 94395) -CapabilityRegistry_GetCapabilitiesTest:test_ExcludesDeprecatedCapabilities() (gas: 122114) -CapabilityRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 58311) -CapabilityRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65746) -CapabilityRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 65329) -CapabilityRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 11428) -CapabilityRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 13087) -CapabilityRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 36653) -CapabilityRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 38938) -CapabilityRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 65482) -CapabilityRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73664) -CapabilityRegistry_RemoveDONsTest:test_RemovesDON() (gas: 54946) -CapabilityRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15647) -CapabilityRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16550) -CapabilityRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 36122) -CapabilityRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15816) -CapabilityRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 115436) -CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 288312) -CapabilityRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 562061) -CapabilityRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 73457) -CapabilityRegistry_RemoveNodesTest:test_RemovesNode() (gas: 75292) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25053) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18418) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfCapabilitiesDON() (gas: 385680) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18408) -CapabilityRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 9796) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19411) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 153162) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17831) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 226375) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 233235) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 107828) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 163668) -CapabilityRegistry_UpdateDONTest:test_UpdatesDON() (gas: 372699) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 20627) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 20048) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 19786) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 15426) -CapabilityRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 36991) -CapabilityRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 253325) -CapabilityRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 161746) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35794) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25064) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27303) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29214) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27291) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 26951) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25508) -CapabilityRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 161800) +CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 152156) +CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 176137) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 24723) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 145769) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 94606) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 92961) +CapabilitiesRegistry_AddDONTest:test_AddDON() (gas: 372909) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19269) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 169874) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 243042) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 249901) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 116949) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43354) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() (gas: 344231) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 180335) +CapabilitiesRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 184333) +CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17602) +CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 18498) +CapabilitiesRegistry_AddNodesTest:test_AddsNodeParams() (gas: 358667) +CapabilitiesRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 358633) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301350) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55207) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24895) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27702) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25108) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27408) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27047) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309800) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 92938) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 93066) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 22944) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 16231) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 94395) +CapabilitiesRegistry_GetCapabilitiesTest:test_ExcludesDeprecatedCapabilities() (gas: 122114) +CapabilitiesRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 58311) +CapabilitiesRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65746) +CapabilitiesRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 65329) +CapabilitiesRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 11428) +CapabilitiesRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 13087) +CapabilitiesRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 36653) +CapabilitiesRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 38938) +CapabilitiesRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 65482) +CapabilitiesRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73664) +CapabilitiesRegistry_RemoveDONsTest:test_RemovesDON() (gas: 54946) +CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15647) +CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16550) +CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 36122) +CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15816) +CapabilitiesRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 115436) +CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 288312) +CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 562061) +CapabilitiesRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 73457) +CapabilitiesRegistry_RemoveNodesTest:test_RemovesNode() (gas: 75292) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25053) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18418) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfCapabilitiesDON() (gas: 385680) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18408) +CapabilitiesRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 9796) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19411) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 153162) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17831) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 226375) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 233235) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 107828) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 163668) +CapabilitiesRegistry_UpdateDONTest:test_UpdatesDON() (gas: 372699) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 20627) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 20048) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 19786) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 15426) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 36991) +CapabilitiesRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 253325) +CapabilitiesRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 161746) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35794) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25064) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27303) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29214) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27291) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 26951) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25508) +CapabilitiesRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 161800) KeystoneForwarder_ReportTest:test_Report_ConfigVersion() (gas: 1802140) KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverInterfaceNotSupported() (gas: 126020) KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverNotContract() (gas: 127513) diff --git a/contracts/scripts/native_solc_compile_all_keystone b/contracts/scripts/native_solc_compile_all_keystone index 1530b307dbd..4b7fca590d6 100755 --- a/contracts/scripts/native_solc_compile_all_keystone +++ b/contracts/scripts/native_solc_compile_all_keystone @@ -28,6 +28,6 @@ compileContract () { "$ROOT"/contracts/src/v0.8/"$1" } -compileContract keystone/CapabilityRegistry.sol +compileContract keystone/CapabilitiesRegistry.sol compileContract keystone/KeystoneForwarder.sol compileContract keystone/OCR3Capability.sol diff --git a/contracts/src/v0.8/keystone/CapabilityRegistry.sol b/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol similarity index 98% rename from contracts/src/v0.8/keystone/CapabilityRegistry.sol rename to contracts/src/v0.8/keystone/CapabilitiesRegistry.sol index c6802608204..9286dd678b1 100644 --- a/contracts/src/v0.8/keystone/CapabilityRegistry.sol +++ b/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol @@ -7,7 +7,7 @@ import {IERC165} from "../vendor/openzeppelin-solidity/v4.8.3/contracts/interfac import {EnumerableSet} from "../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; import {ICapabilityConfiguration} from "./interfaces/ICapabilityConfiguration.sol"; -/// @notice CapabilityRegistry is used to manage Nodes (including their links to Node +/// @notice CapabilitiesRegistry is used to manage Nodes (including their links to Node /// Operators), Capabilities, and DONs (Decentralized Oracle Networks) which are /// sets of nodes that support those Capabilities. /// @dev The contract currently stores the entire state of Node Operators, Nodes, @@ -15,7 +15,7 @@ import {ICapabilityConfiguration} from "./interfaces/ICapabilityConfiguration.so /// if an upgrade is ever required. The team acknowledges this and is fine /// reconfiguring the upgraded contract in the future so as to not add extra /// complexity to this current version. -contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { +contract CapabilitiesRegistry is OwnerIsCreator, TypeAndVersionInterface { // Add the library methods using EnumerableSet for EnumerableSet.Bytes32Set; using EnumerableSet for EnumerableSet.UintSet; @@ -37,7 +37,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice The signer address for application-layer message verification. bytes32 signer; /// @notice This is an Ed25519 public key that is used to identify a node. - /// This key is guaranteed to be unique in the CapabilityRegistry. It is + /// This key is guaranteed to be unique in the CapabilitiesRegistry. It is /// used to identify a node in the the P2P network. bytes32 p2pId; /// @notice The list of hashed capability IDs supported by the node @@ -55,7 +55,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice The signer address for application-layer message verification. bytes32 signer; /// @notice This is an Ed25519 public key that is used to identify a node. - /// This key is guaranteed to be unique in the CapabilityRegistry. It is + /// This key is guaranteed to be unique in the CapabilitiesRegistry. It is /// used to identify a node in the the P2P network. bytes32 p2pId; /// @notice The list of hashed capability IDs supported by the node @@ -76,7 +76,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// only belong to one DON that accepts Workflows. uint32 workflowDONId; /// @notice The signer address for application-layer message verification. - /// @dev This key is guaranteed to be unique in the CapabilityRegistry + /// @dev This key is guaranteed to be unique in the CapabilitiesRegistry /// as a signer address can only belong to one node. /// @dev This should be the ABI encoded version of the node's address. /// I.e 0x0000address. The Capability Registry does not store it as an address so that @@ -84,7 +84,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { /// in the future. bytes32 signer; /// @notice This is an Ed25519 public key that is used to identify a node. - /// This key is guaranteed to be unique in the CapabilityRegistry. It is + /// This key is guaranteed to be unique in the CapabilitiesRegistry. It is /// used to identify a node in the the P2P network. bytes32 p2pId; /// @notice The node's supported capabilities @@ -420,7 +420,7 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { uint32 private s_nextDONId = 1; function typeAndVersion() external pure override returns (string memory) { - return "CapabilityRegistry 1.0.0"; + return "CapabilitiesRegistry 1.0.0"; } /// @notice Adds a list of node operators diff --git a/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol b/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol index 4deaaa4443e..429c2a1d3aa 100644 --- a/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol +++ b/contracts/src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol @@ -16,7 +16,7 @@ interface ICapabilityConfiguration { /// @notice Returns the capability configuration for a particular DON instance. /// @dev donId is required to get DON-specific configuration. It avoids a /// situation where configuration size grows too large. - /// @param donId The DON instance ID. These are stored in the CapabilityRegistry. + /// @param donId The DON instance ID. These are stored in the CapabilitiesRegistry. /// @return configuration DON's configuration for the capability. function getCapabilityConfiguration(uint32 donId) external view returns (bytes memory configuration); diff --git a/contracts/src/v0.8/keystone/test/BaseTest.t.sol b/contracts/src/v0.8/keystone/test/BaseTest.t.sol index 795bb40843e..e637406c145 100644 --- a/contracts/src/v0.8/keystone/test/BaseTest.t.sol +++ b/contracts/src/v0.8/keystone/test/BaseTest.t.sol @@ -4,53 +4,59 @@ pragma solidity ^0.8.19; import {Test} from "forge-std/Test.sol"; import {Constants} from "./Constants.t.sol"; import {CapabilityConfigurationContract} from "./mocks/CapabilityConfigurationContract.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; contract BaseTest is Test, Constants { - CapabilityRegistry internal s_capabilityRegistry; + CapabilitiesRegistry internal s_CapabilitiesRegistry; CapabilityConfigurationContract internal s_capabilityConfigurationContract; - CapabilityRegistry.Capability internal s_basicCapability; - CapabilityRegistry.Capability internal s_capabilityWithConfigurationContract; + CapabilitiesRegistry.Capability internal s_basicCapability; + CapabilitiesRegistry.Capability internal s_capabilityWithConfigurationContract; bytes32 internal s_basicHashedCapabilityId; bytes32 internal s_capabilityWithConfigurationContractId; bytes32 internal s_nonExistentHashedCapabilityId; function setUp() public virtual { vm.startPrank(ADMIN); - s_capabilityRegistry = new CapabilityRegistry(); + s_CapabilitiesRegistry = new CapabilitiesRegistry(); s_capabilityConfigurationContract = new CapabilityConfigurationContract(); - s_basicCapability = CapabilityRegistry.Capability({ + s_basicCapability = CapabilitiesRegistry.Capability({ labelledName: "data-streams-reports", version: "1.0.0", - responseType: CapabilityRegistry.CapabilityResponseType.REPORT, + responseType: CapabilitiesRegistry.CapabilityResponseType.REPORT, configurationContract: address(0), - capabilityType: CapabilityRegistry.CapabilityType.TRIGGER + capabilityType: CapabilitiesRegistry.CapabilityType.TRIGGER }); - s_capabilityWithConfigurationContract = CapabilityRegistry.Capability({ + s_capabilityWithConfigurationContract = CapabilitiesRegistry.Capability({ labelledName: "read-ethereum-mainnet-gas-price", version: "1.0.2", - responseType: CapabilityRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL, + responseType: CapabilitiesRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL, configurationContract: address(s_capabilityConfigurationContract), - capabilityType: CapabilityRegistry.CapabilityType.ACTION + capabilityType: CapabilitiesRegistry.CapabilityType.ACTION }); - s_basicHashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + s_basicHashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); - s_capabilityWithConfigurationContractId = s_capabilityRegistry.getHashedCapabilityId( + s_capabilityWithConfigurationContractId = s_CapabilitiesRegistry.getHashedCapabilityId( s_capabilityWithConfigurationContract.labelledName, s_capabilityWithConfigurationContract.version ); - s_nonExistentHashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId("non-existent-capability", "1.0.0"); + s_nonExistentHashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId("non-existent-capability", "1.0.0"); } - function _getNodeOperators() internal pure returns (CapabilityRegistry.NodeOperator[] memory) { - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](3); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NODE_OPERATOR_ONE_ADMIN, name: NODE_OPERATOR_ONE_NAME}); - nodeOperators[1] = CapabilityRegistry.NodeOperator({admin: NODE_OPERATOR_TWO_ADMIN, name: NODE_OPERATOR_TWO_NAME}); - nodeOperators[2] = CapabilityRegistry.NodeOperator({admin: NODE_OPERATOR_THREE, name: NODE_OPERATOR_THREE_NAME}); + function _getNodeOperators() internal pure returns (CapabilitiesRegistry.NodeOperator[] memory) { + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](3); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({ + admin: NODE_OPERATOR_ONE_ADMIN, + name: NODE_OPERATOR_ONE_NAME + }); + nodeOperators[1] = CapabilitiesRegistry.NodeOperator({ + admin: NODE_OPERATOR_TWO_ADMIN, + name: NODE_OPERATOR_TWO_NAME + }); + nodeOperators[2] = CapabilitiesRegistry.NodeOperator({admin: NODE_OPERATOR_THREE, name: NODE_OPERATOR_THREE_NAME}); return nodeOperators; } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilitiesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddCapabilitiesTest.t.sol similarity index 60% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilitiesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddCapabilitiesTest.t.sol index 6c6b164234f..5b653489503 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddCapabilitiesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddCapabilitiesTest.t.sol @@ -4,50 +4,50 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; import {CapabilityConfigurationContract} from "./mocks/CapabilityConfigurationContract.sol"; import {ICapabilityConfiguration} from "../interfaces/ICapabilityConfiguration.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; import {IERC165} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/interfaces/IERC165.sol"; -contract CapabilityRegistry_AddCapabilitiesTest is BaseTest { +contract CapabilitiesRegistry_AddCapabilitiesTest is BaseTest { event CapabilityConfigured(bytes32 indexed hashedCapabilityId); function test_RevertWhen_CalledByNonAdmin() public { changePrank(STRANGER); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_basicCapability; vm.expectRevert("Only callable by owner"); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_RevertWhen_CapabilityExists() public { - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_basicCapability; // Successfully add the capability the first time - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); // Try to add the same capability again vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.CapabilityAlreadyExists.selector, s_basicHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.CapabilityAlreadyExists.selector, s_basicHashedCapabilityId) ); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_RevertWhen_ConfigurationContractNotDeployed() public { address nonExistentContract = address(1); s_capabilityWithConfigurationContract.configurationContract = nonExistentContract; - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_capabilityWithConfigurationContract; vm.expectRevert( abi.encodeWithSelector( - CapabilityRegistry.InvalidCapabilityConfigurationContractInterface.selector, + CapabilitiesRegistry.InvalidCapabilityConfigurationContractInterface.selector, nonExistentContract ) ); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_RevertWhen_ConfigurationContractDoesNotMatchInterface() public { @@ -62,27 +62,27 @@ contract CapabilityRegistry_AddCapabilitiesTest is BaseTest { abi.encode(false) ); s_capabilityWithConfigurationContract.configurationContract = contractWithoutERC165; - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_capabilityWithConfigurationContract; vm.expectRevert( abi.encodeWithSelector( - CapabilityRegistry.InvalidCapabilityConfigurationContractInterface.selector, + CapabilitiesRegistry.InvalidCapabilityConfigurationContractInterface.selector, contractWithoutERC165 ) ); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_AddCapability_NoConfigurationContract() public { - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_basicCapability; - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId("data-streams-reports", "1.0.0"); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId("data-streams-reports", "1.0.0"); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit CapabilityConfigured(hashedCapabilityId); - s_capabilityRegistry.addCapabilities(capabilities); - CapabilityRegistry.Capability memory storedCapability = s_capabilityRegistry.getCapability(hashedCapabilityId); + s_CapabilitiesRegistry.addCapabilities(capabilities); + CapabilitiesRegistry.Capability memory storedCapability = s_CapabilitiesRegistry.getCapability(hashedCapabilityId); assertEq(storedCapability.labelledName, s_basicCapability.labelledName); assertEq(storedCapability.version, s_basicCapability.version); @@ -91,18 +91,18 @@ contract CapabilityRegistry_AddCapabilitiesTest is BaseTest { } function test_AddCapability_WithConfiguration() public { - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](1); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](1); capabilities[0] = s_capabilityWithConfigurationContract; - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_capabilityWithConfigurationContract.labelledName, s_capabilityWithConfigurationContract.version ); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit CapabilityConfigured(hashedCapabilityId); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.Capability memory storedCapability = s_capabilityRegistry.getCapability(hashedCapabilityId); + CapabilitiesRegistry.Capability memory storedCapability = s_CapabilitiesRegistry.getCapability(hashedCapabilityId); assertEq(storedCapability.labelledName, s_capabilityWithConfigurationContract.labelledName); assertEq(storedCapability.version, s_capabilityWithConfigurationContract.version); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddDONTest.t.sol similarity index 50% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddDONTest.t.sol index 5335c0e2868..df68f8d173a 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddDONTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddDONTest.t.sol @@ -3,26 +3,26 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; import {ICapabilityConfiguration} from "../interfaces/ICapabilityConfiguration.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_AddDONTest is BaseTest { +contract CapabilitiesRegistry_AddDONTest is BaseTest { event ConfigSet(uint32 donId, uint32 configCount); function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](3); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](3); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -32,21 +32,21 @@ contract CapabilityRegistry_AddDONTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: nodeTwoCapabilityIds }); - nodes[2] = CapabilityRegistry.NodeParams({ + nodes[2] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_THREE_ID, p2pId: P2P_ID_THREE, signer: NODE_OPERATOR_THREE_SIGNER_ADDRESS, hashedCapabilityIds: capabilityIds }); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); changePrank(ADMIN); } @@ -55,65 +55,65 @@ contract CapabilityRegistry_AddDONTest is BaseTest { changePrank(STRANGER); vm.expectRevert("Only callable by owner"); bytes32[] memory nodes = new bytes32[](1); - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_NodeDoesNotSupportCapability() public { bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_capabilityWithConfigurationContractId, config: CONFIG_CAPABILITY_CONFIG }); vm.expectRevert( abi.encodeWithSelector( - CapabilityRegistry.NodeDoesNotSupportCapability.selector, + CapabilitiesRegistry.NodeDoesNotSupportCapability.selector, P2P_ID_TWO, s_capabilityWithConfigurationContractId ) ); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_CapabilityDoesNotExist() public { bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_nonExistentHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) ); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_FaultToleranceIsZero() public { bytes32[] memory nodes = new bytes32[](1); nodes[0] = P2P_ID; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidFaultTolerance.selector, 0, 1)); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, 0); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidFaultTolerance.selector, 0, 1)); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, 0); } function test_RevertWhen_DuplicateCapabilityAdded() public { @@ -121,42 +121,42 @@ contract CapabilityRegistry_AddDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](2); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](2); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - capabilityConfigs[1] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[1] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.DuplicateDONCapability.selector, 1, s_basicHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.DuplicateDONCapability.selector, 1, s_basicHashedCapabilityId) ); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DeprecatedCapabilityAdded() public { bytes32 capabilityId = s_basicHashedCapabilityId; bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = capabilityId; - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: capabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.CapabilityIsDeprecated.selector, capabilityId)); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.CapabilityIsDeprecated.selector, capabilityId)); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DuplicateNodeAdded() public { @@ -164,14 +164,14 @@ contract CapabilityRegistry_AddDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.DuplicateDONNode.selector, 1, P2P_ID)); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.DuplicateDONNode.selector, 1, P2P_ID)); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() public { @@ -179,17 +179,17 @@ contract CapabilityRegistry_AddDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfWorkflowDON.selector, 2, P2P_ID)); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodePartOfWorkflowDON.selector, 2, P2P_ID)); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); } function test_AddDON() public { @@ -197,18 +197,18 @@ contract CapabilityRegistry_AddDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_THREE; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](2); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](2); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - capabilityConfigs[1] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[1] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_capabilityWithConfigurationContractId, config: CONFIG_CAPABILITY_CONFIG }); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit ConfigSet(DON_ID, 1); vm.expectCall( address(s_capabilityConfigurationContract), @@ -221,23 +221,25 @@ contract CapabilityRegistry_AddDONTest is BaseTest { ), 1 ); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); - CapabilityRegistry.DONInfo memory donInfo = s_capabilityRegistry.getDON(DON_ID); + CapabilitiesRegistry.DONInfo memory donInfo = s_CapabilitiesRegistry.getDON(DON_ID); assertEq(donInfo.id, DON_ID); assertEq(donInfo.configCount, 1); assertEq(donInfo.isPublic, true); assertEq(donInfo.capabilityConfigurations.length, capabilityConfigs.length); assertEq(donInfo.capabilityConfigurations[0].capabilityId, s_basicHashedCapabilityId); - (bytes memory capabilityRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_capabilityRegistry + (bytes memory CapabilitiesRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_CapabilitiesRegistry .getCapabilityConfigs(DON_ID, s_basicHashedCapabilityId); - assertEq(capabilityRegistryDONConfig, BASIC_CAPABILITY_CONFIG); + assertEq(CapabilitiesRegistryDONConfig, BASIC_CAPABILITY_CONFIG); assertEq(capabilityConfigContractConfig, bytes("")); - (bytes memory capabilityRegistryDONConfigTwo, bytes memory capabilityConfigContractConfigTwo) = s_capabilityRegistry - .getCapabilityConfigs(DON_ID, s_capabilityWithConfigurationContractId); - assertEq(capabilityRegistryDONConfigTwo, CONFIG_CAPABILITY_CONFIG); + ( + bytes memory CapabilitiesRegistryDONConfigTwo, + bytes memory capabilityConfigContractConfigTwo + ) = s_CapabilitiesRegistry.getCapabilityConfigs(DON_ID, s_capabilityWithConfigurationContractId); + assertEq(CapabilitiesRegistryDONConfigTwo, CONFIG_CAPABILITY_CONFIG); assertEq(capabilityConfigContractConfigTwo, CONFIG_CAPABILITY_CONFIG); assertEq(donInfo.nodeP2PIds.length, nodes.length); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodeOperatorsTest.t.sol similarity index 56% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodeOperatorsTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodeOperatorsTest.t.sol index 6fa799bd378..4b75739f05f 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodeOperatorsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodeOperatorsTest.t.sol @@ -2,41 +2,41 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_AddNodeOperatorsTest is BaseTest { +contract CapabilitiesRegistry_AddNodeOperatorsTest is BaseTest { event NodeOperatorAdded(uint32 indexed nodeOperatorId, address indexed admin, string name); function test_RevertWhen_CalledByNonAdmin() public { changePrank(STRANGER); vm.expectRevert("Only callable by owner"); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); } function test_RevertWhen_NodeOperatorAdminAddressZero() public { changePrank(ADMIN); - CapabilityRegistry.NodeOperator[] memory nodeOperators = _getNodeOperators(); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = _getNodeOperators(); nodeOperators[0].admin = address(0); - vm.expectRevert(CapabilityRegistry.InvalidNodeOperatorAdmin.selector); - s_capabilityRegistry.addNodeOperators(nodeOperators); + vm.expectRevert(CapabilitiesRegistry.InvalidNodeOperatorAdmin.selector); + s_CapabilitiesRegistry.addNodeOperators(nodeOperators); } function test_AddNodeOperators() public { changePrank(ADMIN); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit NodeOperatorAdded(TEST_NODE_OPERATOR_ONE_ID, NODE_OPERATOR_ONE_ADMIN, NODE_OPERATOR_ONE_NAME); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit NodeOperatorAdded(TEST_NODE_OPERATOR_TWO_ID, NODE_OPERATOR_TWO_ADMIN, NODE_OPERATOR_TWO_NAME); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); - CapabilityRegistry.NodeOperator memory nodeOperatorOne = s_capabilityRegistry.getNodeOperator( + CapabilitiesRegistry.NodeOperator memory nodeOperatorOne = s_CapabilitiesRegistry.getNodeOperator( TEST_NODE_OPERATOR_ONE_ID ); assertEq(nodeOperatorOne.admin, NODE_OPERATOR_ONE_ADMIN); assertEq(nodeOperatorOne.name, NODE_OPERATOR_ONE_NAME); - CapabilityRegistry.NodeOperator memory nodeOperatorTwo = s_capabilityRegistry.getNodeOperator( + CapabilitiesRegistry.NodeOperator memory nodeOperatorTwo = s_CapabilitiesRegistry.getNodeOperator( TEST_NODE_OPERATOR_TWO_ID ); assertEq(nodeOperatorTwo.admin, NODE_OPERATOR_TWO_ADMIN); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodesTest.t.sol similarity index 61% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodesTest.t.sol index 9399e257e32..3b570e2a6ea 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_AddNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddNodesTest.t.sol @@ -2,50 +2,50 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_AddNodesTest is BaseTest { +contract CapabilitiesRegistry_AddNodesTest is BaseTest { event NodeAdded(bytes32 p2pId, uint32 indexed nodeOperatorId, bytes32 signer); function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; changePrank(ADMIN); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() public { changePrank(STRANGER); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.AccessForbidden.selector, STRANGER)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.AccessForbidden.selector, STRANGER)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_AddingNodeWithInvalidNodeOperator() public { changePrank(ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; uint32 invalidNodeOperatorId = 10000; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: invalidNodeOperatorId, // Invalid NOP p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -53,151 +53,151 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { }); vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.NodeOperatorDoesNotExist.selector, invalidNodeOperatorId) + abi.encodeWithSelector(CapabilitiesRegistry.NodeOperatorDoesNotExist.selector, invalidNodeOperatorId) ); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_SignerAddressEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: bytes32(""), hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeSigner.selector)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeSigner.selector)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_SignerAddressNotUnique() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); changePrank(NODE_OPERATOR_TWO_ADMIN); // Try adding another node with the same signer address - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeSigner.selector)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeSigner.selector)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_AddingDuplicateP2PId() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodeAlreadyExists.selector, P2P_ID)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodeAlreadyExists.selector, P2P_ID)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_P2PIDEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: bytes32(""), signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeP2PId.selector, bytes32(""))); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeP2PId.selector, bytes32(""))); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_AddingNodeWithoutCapabilities() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](0); - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_AddingNodeWithInvalidCapability() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_nonExistentHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); - s_capabilityRegistry.addNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); + s_CapabilitiesRegistry.addNodes(nodes); } function test_AddsNodeParams() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeAdded(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NODE_OPERATOR_ONE_SIGNER_ADDRESS); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.hashedCapabilityIds.length, 2); @@ -209,23 +209,23 @@ contract CapabilityRegistry_AddNodesTest is BaseTest { function test_OwnerCanAddNodes() public { changePrank(ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeAdded(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NODE_OPERATOR_ONE_SIGNER_ADDRESS); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.hashedCapabilityIds.length, 2); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapabilitiesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_DeprecateCapabilitiesTest.t.sol similarity index 54% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapabilitiesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_DeprecateCapabilitiesTest.t.sol index 74c66f8f580..501146a7b78 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_DeprecateCapabilitiesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_DeprecateCapabilitiesTest.t.sol @@ -2,23 +2,23 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_DeprecateCapabilitiesTest is BaseTest { +contract CapabilitiesRegistry_DeprecateCapabilitiesTest is BaseTest { event CapabilityDeprecated(bytes32 indexed hashedCapabilityId); function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_RevertWhen_CalledByNonAdmin() public { changePrank(STRANGER); - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); @@ -27,7 +27,7 @@ contract CapabilityRegistry_DeprecateCapabilitiesTest is BaseTest { deprecatedCapabilities[0] = hashedCapabilityId; vm.expectRevert("Only callable by owner"); - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); } function test_RevertWhen_CapabilityDoesNotExist() public { @@ -35,13 +35,13 @@ contract CapabilityRegistry_DeprecateCapabilitiesTest is BaseTest { deprecatedCapabilities[0] = s_nonExistentHashedCapabilityId; vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) ); - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); } function test_RevertWhen_CapabilityIsDeprecated() public { - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); @@ -49,25 +49,25 @@ contract CapabilityRegistry_DeprecateCapabilitiesTest is BaseTest { bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = hashedCapabilityId; - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.CapabilityIsDeprecated.selector, hashedCapabilityId)); - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.CapabilityIsDeprecated.selector, hashedCapabilityId)); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); } function test_DeprecatesCapability() public { - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = hashedCapabilityId; - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); - assertEq(s_capabilityRegistry.isCapabilityDeprecated(hashedCapabilityId), true); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); + assertEq(s_CapabilitiesRegistry.isCapabilityDeprecated(hashedCapabilityId), true); } function test_EmitsEvent() public { - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); @@ -75,8 +75,8 @@ contract CapabilityRegistry_DeprecateCapabilitiesTest is BaseTest { bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = hashedCapabilityId; - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit CapabilityDeprecated(hashedCapabilityId); - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetCapabilitiesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetCapabilitiesTest.t.sol similarity index 65% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_GetCapabilitiesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetCapabilitiesTest.t.sol index e2dff281252..95551c19cdb 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetCapabilitiesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetCapabilitiesTest.t.sol @@ -2,20 +2,22 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_GetCapabilitiesTest is BaseTest { +contract CapabilitiesRegistry_GetCapabilitiesTest is BaseTest { function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addCapabilities(capabilities); } function test_ReturnsCapabilities() public view { - (bytes32[] memory hashedCapabilityIds, CapabilityRegistry.Capability[] memory capabilities) = s_capabilityRegistry - .getCapabilities(); + ( + bytes32[] memory hashedCapabilityIds, + CapabilitiesRegistry.Capability[] memory capabilities + ) = s_CapabilitiesRegistry.getCapabilities(); assertEq(hashedCapabilityIds.length, 2); assertEq(hashedCapabilityIds[0], keccak256(abi.encode(capabilities[0].labelledName, capabilities[0].version))); @@ -25,31 +27,33 @@ contract CapabilityRegistry_GetCapabilitiesTest is BaseTest { assertEq(capabilities[0].labelledName, "data-streams-reports"); assertEq(capabilities[0].version, "1.0.0"); - assertEq(uint256(capabilities[0].responseType), uint256(CapabilityRegistry.CapabilityResponseType.REPORT)); - assertEq(uint256(capabilities[0].capabilityType), uint256(CapabilityRegistry.CapabilityType.TRIGGER)); + assertEq(uint256(capabilities[0].responseType), uint256(CapabilitiesRegistry.CapabilityResponseType.REPORT)); + assertEq(uint256(capabilities[0].capabilityType), uint256(CapabilitiesRegistry.CapabilityType.TRIGGER)); assertEq(capabilities[0].configurationContract, address(0)); assertEq(capabilities[1].labelledName, "read-ethereum-mainnet-gas-price"); assertEq(capabilities[1].version, "1.0.2"); assertEq( uint256(capabilities[1].responseType), - uint256(CapabilityRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL) + uint256(CapabilitiesRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL) ); - assertEq(uint256(capabilities[1].capabilityType), uint256(CapabilityRegistry.CapabilityType.ACTION)); + assertEq(uint256(capabilities[1].capabilityType), uint256(CapabilitiesRegistry.CapabilityType.ACTION)); assertEq(capabilities[1].configurationContract, address(s_capabilityConfigurationContract)); } function test_ExcludesDeprecatedCapabilities() public { - bytes32 hashedCapabilityId = s_capabilityRegistry.getHashedCapabilityId( + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( s_basicCapability.labelledName, s_basicCapability.version ); bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = hashedCapabilityId; - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); - (bytes32[] memory hashedCapabilityIds, CapabilityRegistry.Capability[] memory capabilities) = s_capabilityRegistry - .getCapabilities(); + ( + bytes32[] memory hashedCapabilityIds, + CapabilitiesRegistry.Capability[] memory capabilities + ) = s_CapabilitiesRegistry.getCapabilities(); assertEq(hashedCapabilityIds.length, 1); assertEq(hashedCapabilityIds[0], keccak256(abi.encode(capabilities[0].labelledName, capabilities[0].version))); @@ -60,7 +64,7 @@ contract CapabilityRegistry_GetCapabilitiesTest is BaseTest { assertEq(capabilities[0].version, "1.0.2"); assertEq( uint256(capabilities[0].responseType), - uint256(CapabilityRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL) + uint256(CapabilitiesRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL) ); assertEq(capabilities[0].configurationContract, address(s_capabilityConfigurationContract)); } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetDONsTest.t.sol similarity index 69% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetDONsTest.t.sol index d56dce6c271..15da8de4121 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetDONsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetDONsTest.t.sol @@ -3,29 +3,29 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_GetDONsTest is BaseTest { +contract CapabilitiesRegistry_GetDONsTest is BaseTest { event ConfigSet(uint32 donId, uint32 configCount); - CapabilityRegistry.CapabilityConfiguration[] private s_capabilityConfigs; + CapabilitiesRegistry.CapabilityConfiguration[] private s_capabilityConfigs; function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](2); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](2); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -35,7 +35,7 @@ contract CapabilityRegistry_GetDONsTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -43,10 +43,10 @@ contract CapabilityRegistry_GetDONsTest is BaseTest { }); changePrank(NODE_OPERATOR_ONE_ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); s_capabilityConfigs.push( - CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }) @@ -57,12 +57,12 @@ contract CapabilityRegistry_GetDONsTest is BaseTest { nodeIds[1] = P2P_ID_TWO; changePrank(ADMIN); - s_capabilityRegistry.addDON(nodeIds, s_capabilityConfigs, true, true, 1); - s_capabilityRegistry.addDON(nodeIds, s_capabilityConfigs, false, false, 1); + s_CapabilitiesRegistry.addDON(nodeIds, s_capabilityConfigs, true, true, 1); + s_CapabilitiesRegistry.addDON(nodeIds, s_capabilityConfigs, false, false, 1); } function test_CorrectlyFetchesDONs() public view { - CapabilityRegistry.DONInfo[] memory dons = s_capabilityRegistry.getDONs(); + CapabilitiesRegistry.DONInfo[] memory dons = s_CapabilitiesRegistry.getDONs(); assertEq(dons.length, 2); assertEq(dons[0].id, DON_ID); assertEq(dons[0].configCount, 1); @@ -82,9 +82,9 @@ contract CapabilityRegistry_GetDONsTest is BaseTest { function test_DoesNotIncludeRemovedDONs() public { uint32[] memory removedDONIDs = new uint32[](1); removedDONIDs[0] = DON_ID; - s_capabilityRegistry.removeDONs(removedDONIDs); + s_CapabilitiesRegistry.removeDONs(removedDONIDs); - CapabilityRegistry.DONInfo[] memory dons = s_capabilityRegistry.getDONs(); + CapabilitiesRegistry.DONInfo[] memory dons = s_CapabilitiesRegistry.getDONs(); assertEq(dons.length, 1); assertEq(dons[0].id, DON_ID_TWO); assertEq(dons[0].configCount, 1); diff --git a/contracts/src/v0.8/keystone/test/CapabiityRegistry_GetHashedCapabilityIdTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetHashedCapabilityIdTest.t.sol similarity index 61% rename from contracts/src/v0.8/keystone/test/CapabiityRegistry_GetHashedCapabilityIdTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetHashedCapabilityIdTest.t.sol index 435138c80e9..b9a6e6dc97a 100644 --- a/contracts/src/v0.8/keystone/test/CapabiityRegistry_GetHashedCapabilityIdTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetHashedCapabilityIdTest.t.sol @@ -4,9 +4,9 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; import {CapabilityConfigurationContract} from "./mocks/CapabilityConfigurationContract.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_GetHashedCapabilityTest is BaseTest { +contract CapabilitiesRegistry_GetHashedCapabilityTest is BaseTest { string constant CAPABILITY_LABELLED_NAME = "ccip1"; string constant CAPABILITY_VERSION = "1.0.0"; @@ -14,15 +14,15 @@ contract CapabilityRegistry_GetHashedCapabilityTest is BaseTest { bytes32 expectedHashedCapabilityId = keccak256(abi.encode(CAPABILITY_LABELLED_NAME, CAPABILITY_VERSION)); assertEq( - s_capabilityRegistry.getHashedCapabilityId(CAPABILITY_LABELLED_NAME, CAPABILITY_VERSION), + s_CapabilitiesRegistry.getHashedCapabilityId(CAPABILITY_LABELLED_NAME, CAPABILITY_VERSION), expectedHashedCapabilityId ); } function test_DoesNotCauseIncorrectClashes() public view { assertNotEq( - s_capabilityRegistry.getHashedCapabilityId(CAPABILITY_LABELLED_NAME, CAPABILITY_VERSION), - s_capabilityRegistry.getHashedCapabilityId("ccip", "11.0.0") + s_CapabilitiesRegistry.getHashedCapabilityId(CAPABILITY_LABELLED_NAME, CAPABILITY_VERSION), + s_CapabilitiesRegistry.getHashedCapabilityId("ccip", "11.0.0") ); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodeOperatorsTest.t.sol similarity index 70% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodeOperatorsTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodeOperatorsTest.t.sol index f1ce3d79ab3..36ef201a998 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodeOperatorsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodeOperatorsTest.t.sol @@ -2,17 +2,17 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_GetNodeOperatorsTest is BaseTest { +contract CapabilitiesRegistry_GetNodeOperatorsTest is BaseTest { function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); } function test_CorrectlyFetchesNodeOperators() public view { - CapabilityRegistry.NodeOperator[] memory nodeOperators = s_capabilityRegistry.getNodeOperators(); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = s_CapabilitiesRegistry.getNodeOperators(); assertEq(nodeOperators.length, 3); assertEq(nodeOperators[0].admin, NODE_OPERATOR_ONE_ADMIN); @@ -29,9 +29,9 @@ contract CapabilityRegistry_GetNodeOperatorsTest is BaseTest { changePrank(ADMIN); uint32[] memory nodeOperatorsToRemove = new uint32[](1); nodeOperatorsToRemove[0] = 2; - s_capabilityRegistry.removeNodeOperators(nodeOperatorsToRemove); + s_CapabilitiesRegistry.removeNodeOperators(nodeOperatorsToRemove); - CapabilityRegistry.NodeOperator[] memory nodeOperators = s_capabilityRegistry.getNodeOperators(); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = s_CapabilitiesRegistry.getNodeOperators(); assertEq(nodeOperators.length, 2); assertEq(nodeOperators[0].admin, NODE_OPERATOR_ONE_ADMIN); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodesTest.t.sol similarity index 75% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodesTest.t.sol index e7a498e08c0..901e7b92728 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_GetNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetNodesTest.t.sol @@ -2,33 +2,33 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_GetNodesTest is BaseTest { +contract CapabilitiesRegistry_GetNodesTest is BaseTest { function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](2); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](2); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -37,11 +37,11 @@ contract CapabilityRegistry_GetNodesTest is BaseTest { changePrank(NODE_OPERATOR_ONE_ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); } function test_CorrectlyFetchesNodes() public view { - CapabilityRegistry.NodeInfo[] memory nodes = s_capabilityRegistry.getNodes(); + CapabilitiesRegistry.NodeInfo[] memory nodes = s_CapabilitiesRegistry.getNodes(); assertEq(nodes.length, 2); assertEq(nodes[0].nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); @@ -65,9 +65,9 @@ contract CapabilityRegistry_GetNodesTest is BaseTest { changePrank(ADMIN); bytes32[] memory nodesToRemove = new bytes32[](1); nodesToRemove[0] = P2P_ID_TWO; - s_capabilityRegistry.removeNodes(nodesToRemove); + s_CapabilitiesRegistry.removeNodes(nodesToRemove); - CapabilityRegistry.NodeInfo[] memory nodes = s_capabilityRegistry.getNodes(); + CapabilitiesRegistry.NodeInfo[] memory nodes = s_CapabilitiesRegistry.getNodes(); assertEq(nodes.length, 1); assertEq(nodes[0].nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveDONsTest.t.sol similarity index 58% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveDONsTest.t.sol index fde382db6f3..012ff102895 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveDONsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveDONsTest.t.sol @@ -3,27 +3,27 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_RemoveDONsTest is BaseTest { +contract CapabilitiesRegistry_RemoveDONsTest is BaseTest { event ConfigSet(uint32 donId, uint32 configCount); function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](2); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](2); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -33,7 +33,7 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -41,11 +41,11 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { }); changePrank(NODE_OPERATOR_ONE_ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); @@ -55,7 +55,7 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { nodeIds[1] = P2P_ID_TWO; changePrank(ADMIN); - s_capabilityRegistry.addDON(nodeIds, capabilityConfigs, true, true, 1); + s_CapabilitiesRegistry.addDON(nodeIds, capabilityConfigs, true, true, 1); } function test_RevertWhen_CalledByNonAdmin() public { @@ -63,34 +63,34 @@ contract CapabilityRegistry_RemoveDONsTest is BaseTest { donIDs[0] = 1; changePrank(STRANGER); vm.expectRevert("Only callable by owner"); - s_capabilityRegistry.removeDONs(donIDs); + s_CapabilitiesRegistry.removeDONs(donIDs); } function test_RevertWhen_DONDoesNotExist() public { uint32 invalidDONId = 10; uint32[] memory donIDs = new uint32[](1); donIDs[0] = invalidDONId; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.DONDoesNotExist.selector, invalidDONId)); - s_capabilityRegistry.removeDONs(donIDs); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.DONDoesNotExist.selector, invalidDONId)); + s_CapabilitiesRegistry.removeDONs(donIDs); } function test_RemovesDON() public { uint32[] memory donIDs = new uint32[](1); donIDs[0] = DON_ID; - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit ConfigSet(DON_ID, 0); - s_capabilityRegistry.removeDONs(donIDs); + s_CapabilitiesRegistry.removeDONs(donIDs); - CapabilityRegistry.DONInfo memory donInfo = s_capabilityRegistry.getDON(DON_ID); + CapabilitiesRegistry.DONInfo memory donInfo = s_CapabilitiesRegistry.getDON(DON_ID); assertEq(donInfo.id, 0); assertEq(donInfo.configCount, 0); assertEq(donInfo.isPublic, false); assertEq(donInfo.capabilityConfigurations.length, 0); - (bytes memory capabilityRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_capabilityRegistry + (bytes memory CapabilitiesRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_CapabilitiesRegistry .getCapabilityConfigs(DON_ID, s_basicHashedCapabilityId); - assertEq(capabilityRegistryDONConfig, bytes("")); + assertEq(CapabilitiesRegistryDONConfig, bytes("")); assertEq(capabilityConfigContractConfig, bytes("")); assertEq(donInfo.nodeP2PIds.length, 0); } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodeOperatorsTest.t.sol similarity index 61% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodeOperatorsTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodeOperatorsTest.t.sol index d7aef824593..bce4e49803b 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodeOperatorsTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodeOperatorsTest.t.sol @@ -2,15 +2,15 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_RemoveNodeOperatorsTest is BaseTest { +contract CapabilitiesRegistry_RemoveNodeOperatorsTest is BaseTest { event NodeOperatorRemoved(uint32 indexed nodeOperatorId); function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); } function test_RevertWhen_CalledByNonOwner() public { @@ -18,28 +18,28 @@ contract CapabilityRegistry_RemoveNodeOperatorsTest is BaseTest { vm.expectRevert("Only callable by owner"); uint32[] memory nodeOperatorsToRemove = new uint32[](2); nodeOperatorsToRemove[1] = 1; - s_capabilityRegistry.removeNodeOperators(nodeOperatorsToRemove); + s_CapabilitiesRegistry.removeNodeOperators(nodeOperatorsToRemove); } function test_RemovesNodeOperator() public { changePrank(ADMIN); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit NodeOperatorRemoved(TEST_NODE_OPERATOR_ONE_ID); - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit NodeOperatorRemoved(TEST_NODE_OPERATOR_TWO_ID); uint32[] memory nodeOperatorsToRemove = new uint32[](2); nodeOperatorsToRemove[0] = TEST_NODE_OPERATOR_ONE_ID; nodeOperatorsToRemove[1] = TEST_NODE_OPERATOR_TWO_ID; - s_capabilityRegistry.removeNodeOperators(nodeOperatorsToRemove); + s_CapabilitiesRegistry.removeNodeOperators(nodeOperatorsToRemove); - CapabilityRegistry.NodeOperator memory nodeOperatorOne = s_capabilityRegistry.getNodeOperator( + CapabilitiesRegistry.NodeOperator memory nodeOperatorOne = s_CapabilitiesRegistry.getNodeOperator( TEST_NODE_OPERATOR_ONE_ID ); assertEq(nodeOperatorOne.admin, address(0)); assertEq(nodeOperatorOne.name, ""); - CapabilityRegistry.NodeOperator memory nodeOperatorTwo = s_capabilityRegistry.getNodeOperator( + CapabilitiesRegistry.NodeOperator memory nodeOperatorTwo = s_CapabilitiesRegistry.getNodeOperator( TEST_NODE_OPERATOR_TWO_ID ); assertEq(nodeOperatorTwo.admin, address(0)); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodesTest.t.sol similarity index 58% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodesTest.t.sol index 14aa5922593..d607f42192c 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_RemoveNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_RemoveNodesTest.t.sol @@ -2,41 +2,41 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_RemoveNodesTest is BaseTest { +contract CapabilitiesRegistry_RemoveNodesTest is BaseTest { event NodeRemoved(bytes32 p2pId); function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](3); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](3); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - nodes[2] = CapabilityRegistry.NodeParams({ + nodes[2] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_THREE_ID, p2pId: P2P_ID_THREE, signer: NODE_OPERATOR_THREE_SIGNER_ADDRESS, @@ -45,7 +45,7 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { changePrank(ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() public { @@ -53,8 +53,8 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = P2P_ID; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.AccessForbidden.selector, STRANGER)); - s_capabilityRegistry.removeNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.AccessForbidden.selector, STRANGER)); + s_CapabilitiesRegistry.removeNodes(nodes); } function test_RevertWhen_NodeDoesNotExist() public { @@ -62,8 +62,8 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = INVALID_P2P_ID; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodeDoesNotExist.selector, INVALID_P2P_ID)); - s_capabilityRegistry.removeNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodeDoesNotExist.selector, INVALID_P2P_ID)); + s_CapabilitiesRegistry.removeNodes(nodes); } function test_RevertWhen_P2PIDEmpty() public { @@ -71,8 +71,8 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = bytes32(""); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodeDoesNotExist.selector, bytes32(""))); - s_capabilityRegistry.removeNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodeDoesNotExist.selector, bytes32(""))); + s_CapabilitiesRegistry.removeNodes(nodes); } function test_RevertWhen_NodePartOfCapabilitiesDON() public { @@ -81,17 +81,17 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, false, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, false, F_VALUE); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfCapabilitiesDON.selector, 1, P2P_ID)); - s_capabilityRegistry.removeNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodePartOfCapabilitiesDON.selector, 1, P2P_ID)); + s_CapabilitiesRegistry.removeNodes(nodes); } function test_CanRemoveWhenDONDeleted() public { @@ -101,30 +101,30 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); // Add DON - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); // Try remove nodes bytes32[] memory removedNodes = new bytes32[](1); removedNodes[0] = P2P_ID; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfWorkflowDON.selector, 1, P2P_ID)); - s_capabilityRegistry.removeNodes(removedNodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodePartOfWorkflowDON.selector, 1, P2P_ID)); + s_CapabilitiesRegistry.removeNodes(removedNodes); // Remove DON uint32[] memory donIds = new uint32[](1); donIds[0] = DON_ID; - s_capabilityRegistry.removeDONs(donIds); + s_CapabilitiesRegistry.removeDONs(donIds); // Remove node - s_capabilityRegistry.removeNodes(removedNodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + s_CapabilitiesRegistry.removeNodes(removedNodes); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); @@ -140,31 +140,31 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { nodes[1] = P2P_ID_TWO; nodes[2] = P2P_ID_THREE; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); // Add DON - s_capabilityRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(nodes, capabilityConfigs, true, true, F_VALUE); // Try remove nodes bytes32[] memory removedNodes = new bytes32[](1); removedNodes[0] = P2P_ID_TWO; - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodePartOfWorkflowDON.selector, 1, P2P_ID_TWO)); - s_capabilityRegistry.removeNodes(removedNodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodePartOfWorkflowDON.selector, 1, P2P_ID_TWO)); + s_CapabilitiesRegistry.removeNodes(removedNodes); // Update nodes in DON bytes32[] memory updatedNodes = new bytes32[](2); updatedNodes[0] = P2P_ID; updatedNodes[1] = P2P_ID_THREE; - s_capabilityRegistry.updateDON(DON_ID, updatedNodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, updatedNodes, capabilityConfigs, true, true, F_VALUE); // Remove node - s_capabilityRegistry.removeNodes(removedNodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID_TWO); + s_CapabilitiesRegistry.removeNodes(removedNodes); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID_TWO); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); @@ -178,11 +178,11 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = P2P_ID; - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeRemoved(P2P_ID); - s_capabilityRegistry.removeNodes(nodes); + s_CapabilitiesRegistry.removeNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); @@ -196,23 +196,23 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = P2P_ID; - s_capabilityRegistry.removeNodes(nodes); + s_CapabilitiesRegistry.removeNodes(nodes); - CapabilityRegistry.NodeParams[] memory nodeParams = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodeParams = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodeParams[0] = CapabilityRegistry.NodeParams({ + nodeParams[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - s_capabilityRegistry.addNodes(nodeParams); + s_CapabilitiesRegistry.addNodes(nodeParams); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.hashedCapabilityIds.length, 2); @@ -227,11 +227,11 @@ contract CapabilityRegistry_RemoveNodesTest is BaseTest { bytes32[] memory nodes = new bytes32[](1); nodes[0] = P2P_ID; - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeRemoved(P2P_ID); - s_capabilityRegistry.removeNodes(nodes); + s_CapabilitiesRegistry.removeNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, 0); assertEq(node.p2pId, bytes32("")); assertEq(node.signer, bytes32("")); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_TypeAndVersionTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_TypeAndVersionTest.t.sol similarity index 51% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_TypeAndVersionTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_TypeAndVersionTest.t.sol index 629b4a17a5a..fb2b3f82b78 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_TypeAndVersionTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_TypeAndVersionTest.t.sol @@ -3,8 +3,8 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -contract CapabilityRegistry_TypeAndVersionTest is BaseTest { +contract CapabilitiesRegistry_TypeAndVersionTest is BaseTest { function test_TypeAndVersion() public view { - assertEq(s_capabilityRegistry.typeAndVersion(), "CapabilityRegistry 1.0.0"); + assertEq(s_CapabilitiesRegistry.typeAndVersion(), "CapabilitiesRegistry 1.0.0"); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateDONTest.t.sol similarity index 51% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateDONTest.t.sol index 96f6a32bbc7..bf9201a8296 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateDONTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateDONTest.t.sol @@ -3,27 +3,27 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; import {ICapabilityConfiguration} from "../interfaces/ICapabilityConfiguration.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_UpdateDONTest is BaseTest { +contract CapabilitiesRegistry_UpdateDONTest is BaseTest { event ConfigSet(uint32 donId, uint32 configCount); function setUp() public override { BaseTest.setUp(); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](3); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](3); bytes32[] memory capabilityIds = new bytes32[](2); capabilityIds[0] = s_basicHashedCapabilityId; capabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -33,67 +33,67 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { bytes32[] memory nodeTwoCapabilityIds = new bytes32[](1); nodeTwoCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[1] = CapabilityRegistry.NodeParams({ + nodes[1] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: nodeTwoCapabilityIds }); - nodes[2] = CapabilityRegistry.NodeParams({ + nodes[2] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_THREE_ID, p2pId: P2P_ID_THREE, signer: NODE_OPERATOR_THREE_SIGNER_ADDRESS, hashedCapabilityIds: capabilityIds }); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); bytes32[] memory donNodes = new bytes32[](2); donNodes[0] = P2P_ID; donNodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - s_capabilityRegistry.addDON(donNodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.addDON(donNodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_CalledByNonAdmin() public { changePrank(STRANGER); vm.expectRevert("Only callable by owner"); bytes32[] memory nodes = new bytes32[](1); - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_NodeDoesNotSupportCapability() public { bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_capabilityWithConfigurationContractId, config: CONFIG_CAPABILITY_CONFIG }); vm.expectRevert( abi.encodeWithSelector( - CapabilityRegistry.NodeDoesNotSupportCapability.selector, + CapabilitiesRegistry.NodeDoesNotSupportCapability.selector, P2P_ID_TWO, s_capabilityWithConfigurationContractId ) ); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DONDoesNotExist() public { @@ -101,30 +101,30 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.DONDoesNotExist.selector, nonExistentDONId)); - s_capabilityRegistry.updateDON(nonExistentDONId, nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.DONDoesNotExist.selector, nonExistentDONId)); + s_CapabilitiesRegistry.updateDON(nonExistentDONId, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_CapabilityDoesNotExist() public { bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_nonExistentHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.CapabilityDoesNotExist.selector, s_nonExistentHashedCapabilityId) ); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DuplicateCapabilityAdded() public { @@ -132,42 +132,42 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](2); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](2); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - capabilityConfigs[1] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[1] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.DuplicateDONCapability.selector, 1, s_basicHashedCapabilityId) + abi.encodeWithSelector(CapabilitiesRegistry.DuplicateDONCapability.selector, 1, s_basicHashedCapabilityId) ); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DeprecatedCapabilityAdded() public { bytes32 capabilityId = s_basicHashedCapabilityId; bytes32[] memory deprecatedCapabilities = new bytes32[](1); deprecatedCapabilities[0] = capabilityId; - s_capabilityRegistry.deprecateCapabilities(deprecatedCapabilities); + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); bytes32[] memory nodes = new bytes32[](2); nodes[0] = P2P_ID; nodes[1] = P2P_ID_TWO; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: capabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.CapabilityIsDeprecated.selector, capabilityId)); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.CapabilityIsDeprecated.selector, capabilityId)); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_RevertWhen_DuplicateNodeAdded() public { @@ -175,14 +175,14 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](1); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.DuplicateDONNode.selector, 1, P2P_ID)); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.DuplicateDONNode.selector, 1, P2P_ID)); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, true, true, F_VALUE); } function test_UpdatesDON() public { @@ -190,23 +190,23 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { nodes[0] = P2P_ID; nodes[1] = P2P_ID_THREE; - CapabilityRegistry.CapabilityConfiguration[] - memory capabilityConfigs = new CapabilityRegistry.CapabilityConfiguration[](2); - capabilityConfigs[0] = CapabilityRegistry.CapabilityConfiguration({ + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](2); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_basicHashedCapabilityId, config: BASIC_CAPABILITY_CONFIG }); - capabilityConfigs[1] = CapabilityRegistry.CapabilityConfiguration({ + capabilityConfigs[1] = CapabilitiesRegistry.CapabilityConfiguration({ capabilityId: s_capabilityWithConfigurationContractId, config: CONFIG_CAPABILITY_CONFIG }); - CapabilityRegistry.DONInfo memory oldDONInfo = s_capabilityRegistry.getDON(DON_ID); + CapabilitiesRegistry.DONInfo memory oldDONInfo = s_CapabilitiesRegistry.getDON(DON_ID); bool expectedDONIsPublic = false; uint32 expectedConfigCount = oldDONInfo.configCount + 1; - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit ConfigSet(DON_ID, expectedConfigCount); vm.expectCall( address(s_capabilityConfigurationContract), @@ -219,18 +219,18 @@ contract CapabilityRegistry_UpdateDONTest is BaseTest { ), 1 ); - s_capabilityRegistry.updateDON(DON_ID, nodes, capabilityConfigs, expectedDONIsPublic, true, F_VALUE); + s_CapabilitiesRegistry.updateDON(DON_ID, nodes, capabilityConfigs, expectedDONIsPublic, true, F_VALUE); - CapabilityRegistry.DONInfo memory donInfo = s_capabilityRegistry.getDON(DON_ID); + CapabilitiesRegistry.DONInfo memory donInfo = s_CapabilitiesRegistry.getDON(DON_ID); assertEq(donInfo.id, DON_ID); assertEq(donInfo.configCount, expectedConfigCount); assertEq(donInfo.isPublic, false); assertEq(donInfo.capabilityConfigurations.length, capabilityConfigs.length); assertEq(donInfo.capabilityConfigurations[0].capabilityId, s_basicHashedCapabilityId); - (bytes memory capabilityRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_capabilityRegistry + (bytes memory CapabilitiesRegistryDONConfig, bytes memory capabilityConfigContractConfig) = s_CapabilitiesRegistry .getCapabilityConfigs(DON_ID, s_basicHashedCapabilityId); - assertEq(capabilityRegistryDONConfig, BASIC_CAPABILITY_CONFIG); + assertEq(CapabilitiesRegistryDONConfig, BASIC_CAPABILITY_CONFIG); assertEq(capabilityConfigContractConfig, bytes("")); assertEq(donInfo.nodeP2PIds.length, nodes.length); diff --git a/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodeOperatorsTest.t.sol new file mode 100644 index 00000000000..f6d74a3159e --- /dev/null +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodeOperatorsTest.t.sol @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {BaseTest} from "./BaseTest.t.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; + +contract CapabilitiesRegistry_UpdateNodeOperatorTest is BaseTest { + event NodeOperatorUpdated(uint32 indexed nodeOperatorId, address indexed admin, string name); + + uint32 private constant TEST_NODE_OPERATOR_ID = 1; + address private constant NEW_NODE_OPERATOR_ADMIN = address(3); + string private constant NEW_NODE_OPERATOR_NAME = "new-node-operator"; + + function setUp() public override { + BaseTest.setUp(); + changePrank(ADMIN); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + } + + function test_RevertWhen_CalledByNonAdminAndNonOwner() public { + changePrank(STRANGER); + + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](1); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({ + admin: NEW_NODE_OPERATOR_ADMIN, + name: NEW_NODE_OPERATOR_NAME + }); + + uint32[] memory nodeOperatorIds = new uint32[](1); + nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; + + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.AccessForbidden.selector, STRANGER)); + s_CapabilitiesRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); + } + + function test_RevertWhen_NodeOperatorAdminIsZeroAddress() public { + changePrank(ADMIN); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](1); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({admin: address(0), name: NEW_NODE_OPERATOR_NAME}); + + uint32[] memory nodeOperatorIds = new uint32[](1); + nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; + + vm.expectRevert(CapabilitiesRegistry.InvalidNodeOperatorAdmin.selector); + s_CapabilitiesRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); + } + + function test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() public { + changePrank(ADMIN); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](1); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({ + admin: NEW_NODE_OPERATOR_ADMIN, + name: NEW_NODE_OPERATOR_NAME + }); + + uint32 invalidNodeOperatorId = 10000; + uint32[] memory nodeOperatorIds = new uint32[](2); + nodeOperatorIds[0] = invalidNodeOperatorId; + vm.expectRevert( + abi.encodeWithSelector(CapabilitiesRegistry.LengthMismatch.selector, nodeOperatorIds.length, nodeOperators.length) + ); + s_CapabilitiesRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); + } + + function test_RevertWhen_NodeOperatorDoesNotExist() public { + changePrank(ADMIN); + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](1); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({ + admin: NEW_NODE_OPERATOR_ADMIN, + name: NEW_NODE_OPERATOR_NAME + }); + + uint32 invalidNodeOperatorId = 10000; + uint32[] memory nodeOperatorIds = new uint32[](1); + nodeOperatorIds[0] = invalidNodeOperatorId; + vm.expectRevert( + abi.encodeWithSelector(CapabilitiesRegistry.NodeOperatorDoesNotExist.selector, invalidNodeOperatorId) + ); + s_CapabilitiesRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); + } + + function test_UpdatesNodeOperator() public { + changePrank(ADMIN); + + CapabilitiesRegistry.NodeOperator[] memory nodeOperators = new CapabilitiesRegistry.NodeOperator[](1); + nodeOperators[0] = CapabilitiesRegistry.NodeOperator({ + admin: NEW_NODE_OPERATOR_ADMIN, + name: NEW_NODE_OPERATOR_NAME + }); + + uint32[] memory nodeOperatorIds = new uint32[](1); + nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; + + vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); + emit NodeOperatorUpdated(TEST_NODE_OPERATOR_ID, NEW_NODE_OPERATOR_ADMIN, NEW_NODE_OPERATOR_NAME); + s_CapabilitiesRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); + + CapabilitiesRegistry.NodeOperator memory nodeOperator = s_CapabilitiesRegistry.getNodeOperator( + TEST_NODE_OPERATOR_ID + ); + assertEq(nodeOperator.admin, NEW_NODE_OPERATOR_ADMIN); + assertEq(nodeOperator.name, NEW_NODE_OPERATOR_NAME); + } +} diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodesTest.t.sol similarity index 61% rename from contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol rename to contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodesTest.t.sol index 2f3f18d39a8..cc180ec54e5 100644 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodesTest.t.sol @@ -2,27 +2,27 @@ pragma solidity ^0.8.19; import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; +import {CapabilitiesRegistry} from "../CapabilitiesRegistry.sol"; -contract CapabilityRegistry_UpdateNodesTest is BaseTest { +contract CapabilitiesRegistry_UpdateNodesTest is BaseTest { event NodeUpdated(bytes32 p2pId, uint32 indexed nodeOperatorId, bytes32 signer); function setUp() public override { BaseTest.setUp(); changePrank(ADMIN); - CapabilityRegistry.Capability[] memory capabilities = new CapabilityRegistry.Capability[](2); + CapabilitiesRegistry.Capability[] memory capabilities = new CapabilitiesRegistry.Capability[](2); capabilities[0] = s_basicCapability; capabilities[1] = s_capabilityWithConfigurationContract; - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - s_capabilityRegistry.addCapabilities(capabilities); + s_CapabilitiesRegistry.addNodeOperators(_getNodeOperators()); + s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](2); hashedCapabilityIds[0] = s_basicHashedCapabilityId; hashedCapabilityIds[1] = s_capabilityWithConfigurationContractId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, @@ -30,9 +30,9 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { }); changePrank(NODE_OPERATOR_ONE_ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, @@ -40,184 +40,184 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { }); changePrank(NODE_OPERATOR_TWO_ADMIN); - s_capabilityRegistry.addNodes(nodes); + s_CapabilitiesRegistry.addNodes(nodes); } function test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() public { changePrank(STRANGER); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.AccessForbidden.selector, STRANGER)); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.AccessForbidden.selector, STRANGER)); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_NodeDoesNotExist() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: INVALID_P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodeDoesNotExist.selector, INVALID_P2P_ID)); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodeDoesNotExist.selector, INVALID_P2P_ID)); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_P2PIDEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: bytes32(""), signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.NodeDoesNotExist.selector, bytes32(""))); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.NodeDoesNotExist.selector, bytes32(""))); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_SignerAddressEmpty() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: bytes32(""), hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeSigner.selector)); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeSigner.selector)); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_TWO_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(CapabilityRegistry.InvalidNodeSigner.selector); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(CapabilitiesRegistry.InvalidNodeSigner.selector); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_UpdatingNodeWithoutCapabilities() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](0); - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_RevertWhen_AddingNodeWithInvalidCapability() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_nonExistentHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); - s_capabilityRegistry.updateNodes(nodes); + vm.expectRevert(abi.encodeWithSelector(CapabilitiesRegistry.InvalidNodeCapabilities.selector, hashedCapabilityIds)); + s_CapabilitiesRegistry.updateNodes(nodes); } function test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; // Set node one's signer to another address - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: bytes32(abi.encodePacked(address(6666))), hashedCapabilityIds: hashedCapabilityIds }); - s_capabilityRegistry.updateNodes(nodes); + s_CapabilitiesRegistry.updateNodes(nodes); // Set node two's signer to node one's signer changePrank(NODE_OPERATOR_TWO_ADMIN); - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_TWO_ID, p2pId: P2P_ID_TWO, signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, hashedCapabilityIds: hashedCapabilityIds }); - s_capabilityRegistry.updateNodes(nodes); + s_CapabilitiesRegistry.updateNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID_TWO); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID_TWO); assertEq(node.signer, NODE_OPERATOR_ONE_SIGNER_ADDRESS); } function test_UpdatesNodeParams() public { changePrank(NODE_OPERATOR_ONE_ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NEW_NODE_SIGNER, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeUpdated(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NEW_NODE_SIGNER); - s_capabilityRegistry.updateNodes(nodes); + s_CapabilitiesRegistry.updateNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.signer, NEW_NODE_SIGNER); @@ -229,22 +229,22 @@ contract CapabilityRegistry_UpdateNodesTest is BaseTest { function test_OwnerCanUpdateNodes() public { changePrank(ADMIN); - CapabilityRegistry.NodeParams[] memory nodes = new CapabilityRegistry.NodeParams[](1); + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); bytes32[] memory hashedCapabilityIds = new bytes32[](1); hashedCapabilityIds[0] = s_basicHashedCapabilityId; - nodes[0] = CapabilityRegistry.NodeParams({ + nodes[0] = CapabilitiesRegistry.NodeParams({ nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, p2pId: P2P_ID, signer: NEW_NODE_SIGNER, hashedCapabilityIds: hashedCapabilityIds }); - vm.expectEmit(address(s_capabilityRegistry)); + vm.expectEmit(address(s_CapabilitiesRegistry)); emit NodeUpdated(P2P_ID, TEST_NODE_OPERATOR_ONE_ID, NEW_NODE_SIGNER); - s_capabilityRegistry.updateNodes(nodes); + s_CapabilitiesRegistry.updateNodes(nodes); - CapabilityRegistry.NodeInfo memory node = s_capabilityRegistry.getNode(P2P_ID); + CapabilitiesRegistry.NodeInfo memory node = s_CapabilitiesRegistry.getNode(P2P_ID); assertEq(node.nodeOperatorId, TEST_NODE_OPERATOR_ONE_ID); assertEq(node.p2pId, P2P_ID); assertEq(node.signer, NEW_NODE_SIGNER); diff --git a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodeOperatorsTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodeOperatorsTest.t.sol deleted file mode 100644 index 77d180a784a..00000000000 --- a/contracts/src/v0.8/keystone/test/CapabilityRegistry_UpdateNodeOperatorsTest.t.sol +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; - -import {BaseTest} from "./BaseTest.t.sol"; -import {CapabilityRegistry} from "../CapabilityRegistry.sol"; - -contract CapabilityRegistry_UpdateNodeOperatorTest is BaseTest { - event NodeOperatorUpdated(uint32 indexed nodeOperatorId, address indexed admin, string name); - - uint32 private constant TEST_NODE_OPERATOR_ID = 1; - address private constant NEW_NODE_OPERATOR_ADMIN = address(3); - string private constant NEW_NODE_OPERATOR_NAME = "new-node-operator"; - - function setUp() public override { - BaseTest.setUp(); - changePrank(ADMIN); - s_capabilityRegistry.addNodeOperators(_getNodeOperators()); - } - - function test_RevertWhen_CalledByNonAdminAndNonOwner() public { - changePrank(STRANGER); - - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NEW_NODE_OPERATOR_ADMIN, name: NEW_NODE_OPERATOR_NAME}); - - uint32[] memory nodeOperatorIds = new uint32[](1); - nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; - - vm.expectRevert(abi.encodeWithSelector(CapabilityRegistry.AccessForbidden.selector, STRANGER)); - s_capabilityRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); - } - - function test_RevertWhen_NodeOperatorAdminIsZeroAddress() public { - changePrank(ADMIN); - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: address(0), name: NEW_NODE_OPERATOR_NAME}); - - uint32[] memory nodeOperatorIds = new uint32[](1); - nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; - - vm.expectRevert(CapabilityRegistry.InvalidNodeOperatorAdmin.selector); - s_capabilityRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); - } - - function test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() public { - changePrank(ADMIN); - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NEW_NODE_OPERATOR_ADMIN, name: NEW_NODE_OPERATOR_NAME}); - - uint32 invalidNodeOperatorId = 10000; - uint32[] memory nodeOperatorIds = new uint32[](2); - nodeOperatorIds[0] = invalidNodeOperatorId; - vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.LengthMismatch.selector, nodeOperatorIds.length, nodeOperators.length) - ); - s_capabilityRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); - } - - function test_RevertWhen_NodeOperatorDoesNotExist() public { - changePrank(ADMIN); - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NEW_NODE_OPERATOR_ADMIN, name: NEW_NODE_OPERATOR_NAME}); - - uint32 invalidNodeOperatorId = 10000; - uint32[] memory nodeOperatorIds = new uint32[](1); - nodeOperatorIds[0] = invalidNodeOperatorId; - vm.expectRevert( - abi.encodeWithSelector(CapabilityRegistry.NodeOperatorDoesNotExist.selector, invalidNodeOperatorId) - ); - s_capabilityRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); - } - - function test_UpdatesNodeOperator() public { - changePrank(ADMIN); - - CapabilityRegistry.NodeOperator[] memory nodeOperators = new CapabilityRegistry.NodeOperator[](1); - nodeOperators[0] = CapabilityRegistry.NodeOperator({admin: NEW_NODE_OPERATOR_ADMIN, name: NEW_NODE_OPERATOR_NAME}); - - uint32[] memory nodeOperatorIds = new uint32[](1); - nodeOperatorIds[0] = TEST_NODE_OPERATOR_ID; - - vm.expectEmit(true, true, true, true, address(s_capabilityRegistry)); - emit NodeOperatorUpdated(TEST_NODE_OPERATOR_ID, NEW_NODE_OPERATOR_ADMIN, NEW_NODE_OPERATOR_NAME); - s_capabilityRegistry.updateNodeOperators(nodeOperatorIds, nodeOperators); - - CapabilityRegistry.NodeOperator memory nodeOperator = s_capabilityRegistry.getNodeOperator(TEST_NODE_OPERATOR_ID); - assertEq(nodeOperator.admin, NEW_NODE_OPERATOR_ADMIN); - assertEq(nodeOperator.name, NEW_NODE_OPERATOR_NAME); - } -} diff --git a/core/capabilities/reader.go b/core/capabilities/reader.go index a3d55751a8e..0a40b4652bd 100644 --- a/core/capabilities/reader.go +++ b/core/capabilities/reader.go @@ -9,7 +9,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/types" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/keystone_capability_registry" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" evmrelaytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) @@ -26,9 +26,9 @@ type hashedCapabilityID [32]byte type donID uint32 type state struct { - IDsToDONs map[donID]kcr.CapabilityRegistryDONInfo - IDsToNodes map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo - IDsToCapabilities map[hashedCapabilityID]kcr.CapabilityRegistryCapability + IDsToDONs map[donID]kcr.CapabilitiesRegistryDONInfo + IDsToNodes map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo + IDsToCapabilities map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability } func (r *remoteRegistryReader) LocalNode(ctx context.Context) (capabilities.Node, error) { @@ -69,35 +69,35 @@ func (r *remoteRegistryReader) LocalNode(ctx context.Context) (capabilities.Node } func (r *remoteRegistryReader) state(ctx context.Context) (state, error) { - dons := []kcr.CapabilityRegistryDONInfo{} - err := r.r.GetLatestValue(ctx, "capabilityRegistry", "getDONs", nil, &dons) + dons := []kcr.CapabilitiesRegistryDONInfo{} + err := r.r.GetLatestValue(ctx, "CapabilitiesRegistry", "getDONs", nil, &dons) if err != nil { return state{}, err } - idsToDONs := map[donID]kcr.CapabilityRegistryDONInfo{} + idsToDONs := map[donID]kcr.CapabilitiesRegistryDONInfo{} for _, d := range dons { idsToDONs[donID(d.Id)] = d } caps := kcr.GetCapabilities{} - err = r.r.GetLatestValue(ctx, "capabilityRegistry", "getCapabilities", nil, &caps) + err = r.r.GetLatestValue(ctx, "CapabilitiesRegistry", "getCapabilities", nil, &caps) if err != nil { return state{}, err } - idsToCapabilities := map[hashedCapabilityID]kcr.CapabilityRegistryCapability{} + idsToCapabilities := map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{} for i, c := range caps.Capabilities { idsToCapabilities[caps.HashedCapabilityIds[i]] = c } - nodes := []kcr.CapabilityRegistryNodeInfo{} - err = r.r.GetLatestValue(ctx, "capabilityRegistry", "getNodes", nil, &nodes) + nodes := []kcr.CapabilitiesRegistryNodeInfo{} + err = r.r.GetLatestValue(ctx, "CapabilitiesRegistry", "getNodes", nil, &nodes) if err != nil { return state{}, err } - idsToNodes := map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{} + idsToNodes := map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{} for _, node := range nodes { idsToNodes[node.P2pId] = node } @@ -112,8 +112,8 @@ type contractReaderFactory interface { func newRemoteRegistryReader(ctx context.Context, lggr logger.Logger, peerWrapper p2ptypes.PeerWrapper, relayer contractReaderFactory, remoteRegistryAddress string) (*remoteRegistryReader, error) { contractReaderConfig := evmrelaytypes.ChainReaderConfig{ Contracts: map[string]evmrelaytypes.ChainContractReader{ - "capabilityRegistry": { - ContractABI: kcr.CapabilityRegistryABI, + "CapabilitiesRegistry": { + ContractABI: kcr.CapabilitiesRegistryABI, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ "getDONs": { ChainSpecificName: "getDONs", @@ -142,7 +142,7 @@ func newRemoteRegistryReader(ctx context.Context, lggr logger.Logger, peerWrappe err = cr.Bind(ctx, []types.BoundContract{ { Address: remoteRegistryAddress, - Name: "capabilityRegistry", + Name: "CapabilitiesRegistry", }, }) if err != nil { diff --git a/core/capabilities/reader_test.go b/core/capabilities/reader_test.go index ded525f6142..747736c23bd 100644 --- a/core/capabilities/reader_test.go +++ b/core/capabilities/reader_test.go @@ -21,7 +21,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/keystone_capability_registry" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -30,13 +30,13 @@ import ( evmrelaytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) -var writeChainCapability = kcr.CapabilityRegistryCapability{ +var writeChainCapability = kcr.CapabilitiesRegistryCapability{ LabelledName: "write-chain", Version: "1.0.1", ResponseType: uint8(1), } -func startNewChainWithRegistry(t *testing.T) (*kcr.CapabilityRegistry, common.Address, *bind.TransactOpts, *backends.SimulatedBackend) { +func startNewChainWithRegistry(t *testing.T) (*kcr.CapabilitiesRegistry, common.Address, *bind.TransactOpts, *backends.SimulatedBackend) { owner := testutils.MustNewSimTransactor(t) oneEth, _ := new(big.Int).SetString("100000000000000000000", 10) @@ -47,13 +47,13 @@ func startNewChainWithRegistry(t *testing.T) (*kcr.CapabilityRegistry, common.Ad }}, gasLimit) simulatedBackend.Commit() - capabilityRegistryAddress, _, capabilityRegistry, err := kcr.DeployCapabilityRegistry(owner, simulatedBackend) - require.NoError(t, err, "DeployCapabilityRegistry failed") + CapabilitiesRegistryAddress, _, CapabilitiesRegistry, err := kcr.DeployCapabilitiesRegistry(owner, simulatedBackend) + require.NoError(t, err, "DeployCapabilitiesRegistry failed") - fmt.Println("Deployed CapabilityRegistry at", capabilityRegistryAddress.Hex()) + fmt.Println("Deployed CapabilitiesRegistry at", CapabilitiesRegistryAddress.Hex()) simulatedBackend.Commit() - return capabilityRegistry, capabilityRegistryAddress, owner, simulatedBackend + return CapabilitiesRegistry, CapabilitiesRegistryAddress, owner, simulatedBackend } type crFactory struct { @@ -133,14 +133,14 @@ func TestReader_Integration(t *testing.T) { ctx := testutils.Context(t) reg, regAddress, owner, sim := startNewChainWithRegistry(t) - _, err := reg.AddCapabilities(owner, []kcr.CapabilityRegistryCapability{writeChainCapability}) + _, err := reg.AddCapabilities(owner, []kcr.CapabilitiesRegistryCapability{writeChainCapability}) require.NoError(t, err, "AddCapability failed for %s", writeChainCapability.LabelledName) sim.Commit() cid, err := reg.GetHashedCapabilityId(&bind.CallOpts{}, writeChainCapability.LabelledName, writeChainCapability.Version) require.NoError(t, err) - _, err = reg.AddNodeOperators(owner, []kcr.CapabilityRegistryNodeOperator{ + _, err = reg.AddNodeOperators(owner, []kcr.CapabilitiesRegistryNodeOperator{ { Admin: owner.From, Name: "TEST_NOP", @@ -160,7 +160,7 @@ func TestReader_Integration(t *testing.T) { randomWord(), } - nodes := []kcr.CapabilityRegistryNodeParams{ + nodes := []kcr.CapabilitiesRegistryNodeParams{ { // The first NodeOperatorId has id 1 since the id is auto-incrementing. NodeOperatorId: uint32(1), @@ -186,7 +186,7 @@ func TestReader_Integration(t *testing.T) { _, err = reg.AddNodes(owner, nodes) require.NoError(t, err) - cfgs := []kcr.CapabilityRegistryCapabilityConfiguration{ + cfgs := []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: cid, Config: []byte(`{"hello": "world"}`), @@ -221,7 +221,7 @@ func TestReader_Integration(t *testing.T) { assert.Equal(t, writeChainCapability, gotCap) assert.Len(t, s.IDsToDONs, 1) - assert.Equal(t, kcr.CapabilityRegistryDONInfo{ + assert.Equal(t, kcr.CapabilitiesRegistryDONInfo{ Id: 1, // initial Id ConfigCount: 1, // initial Count IsPublic: true, @@ -231,7 +231,7 @@ func TestReader_Integration(t *testing.T) { CapabilityConfigurations: cfgs, }, s.IDsToDONs[1]) - nodesInfo := []kcr.CapabilityRegistryNodeInfo{ + nodesInfo := []kcr.CapabilitiesRegistryNodeInfo{ { // The first NodeOperatorId has id 1 since the id is auto-incrementing. NodeOperatorId: uint32(1), @@ -265,7 +265,7 @@ func TestReader_Integration(t *testing.T) { } assert.Len(t, s.IDsToNodes, 3) - assert.Equal(t, map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{ + assert.Equal(t, map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ nodeSet[0]: nodesInfo[0], nodeSet[1]: nodesInfo[1], nodeSet[2]: nodesInfo[2], diff --git a/core/capabilities/registry.go b/core/capabilities/registry.go index 6a3a4ffb83b..3cfe1d169b7 100644 --- a/core/capabilities/registry.go +++ b/core/capabilities/registry.go @@ -158,6 +158,6 @@ func (r *Registry) Add(ctx context.Context, c capabilities.BaseCapability) error func NewRegistry(lggr logger.Logger) *Registry { return &Registry{ m: map[string]capabilities.BaseCapability{}, - lggr: lggr.Named("CapabilityRegistry"), + lggr: lggr.Named("CapabilitiesRegistry"), } } diff --git a/core/capabilities/syncer.go b/core/capabilities/syncer.go index 50dece12c01..1a62b8af3a7 100644 --- a/core/capabilities/syncer.go +++ b/core/capabilities/syncer.go @@ -25,7 +25,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/target" remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/streams" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/keystone_capability_registry" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" "github.com/smartcontractkit/chainlink/v2/core/logger" p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" ) @@ -174,7 +174,7 @@ func (s *registrySyncer) sync(ctx context.Context) error { allPeers[p] = cfg } - publicDONs := []kcr.CapabilityRegistryDONInfo{} + publicDONs := []kcr.CapabilitiesRegistryDONInfo{} for _, d := range readerState.IDsToDONs { if !d.IsPublic { continue @@ -202,8 +202,8 @@ func (s *registrySyncer) sync(ctx context.Context) error { // We'll also construct a set to record what DONs the current node is a part of, // regardless of any modifiers (public/acceptsWorkflows etc). myID := s.peerWrapper.GetPeer().ID() - myWorkflowDONs := []kcr.CapabilityRegistryDONInfo{} - remoteWorkflowDONs := []kcr.CapabilityRegistryDONInfo{} + myWorkflowDONs := []kcr.CapabilitiesRegistryDONInfo{} + remoteWorkflowDONs := []kcr.CapabilitiesRegistryDONInfo{} myDONs := map[uint32]bool{} for _, d := range readerState.IDsToDONs { for _, peerID := range d.NodeP2PIds { @@ -223,8 +223,8 @@ func (s *registrySyncer) sync(ctx context.Context) error { // - remote capability DONs (with IsPublic = true) the current node is a part of. // These need server-side shims. - myCapabilityDONs := []kcr.CapabilityRegistryDONInfo{} - remoteCapabilityDONs := []kcr.CapabilityRegistryDONInfo{} + myCapabilityDONs := []kcr.CapabilitiesRegistryDONInfo{} + remoteCapabilityDONs := []kcr.CapabilitiesRegistryDONInfo{} for _, d := range publicDONs { if len(d.CapabilityConfigurations) > 0 { if myDONs[d.Id] { @@ -267,7 +267,7 @@ func (s *registrySyncer) sync(ctx context.Context) error { return nil } -func signersFor(don kcr.CapabilityRegistryDONInfo, state state) ([][]byte, error) { +func signersFor(don kcr.CapabilitiesRegistryDONInfo, state state) ([][]byte, error) { s := [][]byte{} for _, nodeID := range don.NodeP2PIds { node, ok := state.IDsToNodes[nodeID] @@ -283,7 +283,7 @@ func signersFor(don kcr.CapabilityRegistryDONInfo, state state) ([][]byte, error return s, nil } -func toDONInfo(don kcr.CapabilityRegistryDONInfo) *capabilities.DON { +func toDONInfo(don kcr.CapabilitiesRegistryDONInfo) *capabilities.DON { peerIDs := []p2ptypes.PeerID{} for _, p := range don.NodeP2PIds { peerIDs = append(peerIDs, p) @@ -312,7 +312,7 @@ func toCapabilityType(capabilityType uint8) capabilities.CapabilityType { } } -func (s *registrySyncer) addRemoteCapabilities(ctx context.Context, myDON kcr.CapabilityRegistryDONInfo, remoteDON kcr.CapabilityRegistryDONInfo, state state) error { +func (s *registrySyncer) addRemoteCapabilities(ctx context.Context, myDON kcr.CapabilitiesRegistryDONInfo, remoteDON kcr.CapabilitiesRegistryDONInfo, state state) error { for _, c := range remoteDON.CapabilityConfigurations { capability, ok := state.IDsToCapabilities[c.CapabilityId] if !ok { @@ -399,7 +399,7 @@ type capabilityService interface { services.Service } -func (s *registrySyncer) addToRegistryAndSetDispatcher(ctx context.Context, capabilityInfo kcr.CapabilityRegistryCapability, don kcr.CapabilityRegistryDONInfo, newCapFn func(info capabilities.CapabilityInfo) (capabilityService, error)) error { +func (s *registrySyncer) addToRegistryAndSetDispatcher(ctx context.Context, capabilityInfo kcr.CapabilitiesRegistryCapability, don kcr.CapabilitiesRegistryDONInfo, newCapFn func(info capabilities.CapabilityInfo) (capabilityService, error)) error { fullCapID := fmt.Sprintf("%s@%s", capabilityInfo.LabelledName, capabilityInfo.Version) info, err := capabilities.NewRemoteCapabilityInfo( fullCapID, @@ -449,7 +449,7 @@ var ( defaultTargetRequestTimeout = time.Minute ) -func (s *registrySyncer) enableExternalAccess(ctx context.Context, myPeerID p2ptypes.PeerID, don kcr.CapabilityRegistryDONInfo, state state, remoteWorkflowDONs []kcr.CapabilityRegistryDONInfo) error { +func (s *registrySyncer) enableExternalAccess(ctx context.Context, myPeerID p2ptypes.PeerID, don kcr.CapabilitiesRegistryDONInfo, state state, remoteWorkflowDONs []kcr.CapabilitiesRegistryDONInfo) error { idsToDONs := map[string]capabilities.DON{} for _, d := range remoteWorkflowDONs { idsToDONs[fmt.Sprint(d.Id)] = *toDONInfo(d) @@ -520,7 +520,7 @@ type receiverService interface { remotetypes.Receiver } -func (s *registrySyncer) addReceiver(ctx context.Context, capability kcr.CapabilityRegistryCapability, don kcr.CapabilityRegistryDONInfo, newReceiverFn func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error)) error { +func (s *registrySyncer) addReceiver(ctx context.Context, capability kcr.CapabilitiesRegistryCapability, don kcr.CapabilitiesRegistryDONInfo, newReceiverFn func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error)) error { fullCapID := fmt.Sprintf("%s@%s", capability.LabelledName, capability.Version) info, err := capabilities.NewRemoteCapabilityInfo( fullCapID, diff --git a/core/capabilities/syncer_test.go b/core/capabilities/syncer_test.go index f3050167ecf..c1bc379e2f3 100644 --- a/core/capabilities/syncer_test.go +++ b/core/capabilities/syncer_test.go @@ -16,7 +16,7 @@ import ( commonMocks "github.com/smartcontractkit/chainlink-common/pkg/types/mocks" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" remoteMocks "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types/mocks" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/keystone_capability_registry" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" @@ -140,7 +140,7 @@ func TestSyncer_WiresUpExternalCapabilities(t *testing.T) { // no entries should be added to the registry. mr := &mockReader{ s: state{ - IDsToDONs: map[donID]kcr.CapabilityRegistryDONInfo{ + IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ donID(dID): { Id: dID, ConfigCount: uint32(0), @@ -148,7 +148,7 @@ func TestSyncer_WiresUpExternalCapabilities(t *testing.T) { IsPublic: true, AcceptsWorkflows: true, NodeP2PIds: nodes, - CapabilityConfigurations: []kcr.CapabilityRegistryCapabilityConfiguration{ + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: triggerCapID, Config: []byte(""), @@ -160,7 +160,7 @@ func TestSyncer_WiresUpExternalCapabilities(t *testing.T) { }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilityRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", @@ -172,7 +172,7 @@ func TestSyncer_WiresUpExternalCapabilities(t *testing.T) { CapabilityType: 3, }, }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{ + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ nodes[0]: { NodeOperatorId: 1, Signer: randomWord(), @@ -242,7 +242,7 @@ func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { // We expect no action to be taken by the syncer. mr := &mockReader{ s: state{ - IDsToDONs: map[donID]kcr.CapabilityRegistryDONInfo{ + IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ donID(dID): { Id: dID, ConfigCount: uint32(0), @@ -250,7 +250,7 @@ func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { IsPublic: false, AcceptsWorkflows: true, NodeP2PIds: nodes, - CapabilityConfigurations: []kcr.CapabilityRegistryCapabilityConfiguration{ + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: triggerCapID, Config: []byte(""), @@ -262,7 +262,7 @@ func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilityRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", @@ -274,7 +274,7 @@ func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { CapabilityType: 3, }, }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{ + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ nodes[0]: { NodeOperatorId: 1, Signer: randomWord(), @@ -356,7 +356,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDON(t *testing.T) { // We expect receivers to be wired up and both capabilities to be added to the registry. mr := &mockReader{ s: state{ - IDsToDONs: map[donID]kcr.CapabilityRegistryDONInfo{ + IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ donID(dID): { Id: dID, ConfigCount: uint32(0), @@ -372,7 +372,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDON(t *testing.T) { IsPublic: true, AcceptsWorkflows: false, NodeP2PIds: capabilityDonNodes, - CapabilityConfigurations: []kcr.CapabilityRegistryCapabilityConfiguration{ + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: triggerCapID, Config: []byte(""), @@ -384,7 +384,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDON(t *testing.T) { }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilityRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", @@ -396,7 +396,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDON(t *testing.T) { CapabilityType: 3, }, }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{ + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ capabilityDonNodes[0]: { NodeOperatorId: 1, Signer: randomWord(), @@ -501,7 +501,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities( // We expect receivers to be wired up and both capabilities to be added to the registry. mr := &mockReader{ s: state{ - IDsToDONs: map[donID]kcr.CapabilityRegistryDONInfo{ + IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ donID(dID): { Id: dID, ConfigCount: uint32(0), @@ -517,7 +517,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities( IsPublic: true, AcceptsWorkflows: false, NodeP2PIds: capabilityDonNodes, - CapabilityConfigurations: []kcr.CapabilityRegistryCapabilityConfiguration{ + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: triggerCapID, Config: []byte(""), @@ -531,7 +531,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities( IsPublic: false, AcceptsWorkflows: false, NodeP2PIds: capabilityDonNodes, - CapabilityConfigurations: []kcr.CapabilityRegistryCapabilityConfiguration{ + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ { CapabilityId: targetCapID, Config: []byte(""), @@ -539,7 +539,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities( }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilityRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", @@ -551,7 +551,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities( CapabilityType: 3, }, }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilityRegistryNodeInfo{ + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ capabilityDonNodes[0]: { NodeOperatorId: 1, Signer: randomWord(), diff --git a/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go b/core/gethwrappers/keystone/generated/capabilities_registry/capabilities_registry.go similarity index 55% rename from core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go rename to core/gethwrappers/keystone/generated/capabilities_registry/capabilities_registry.go index 3b8f26b4983..dfb70824fee 100644 --- a/core/gethwrappers/keystone/generated/keystone_capability_registry/keystone_capability_registry.go +++ b/core/gethwrappers/keystone/generated/capabilities_registry/capabilities_registry.go @@ -1,7 +1,7 @@ // Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. -package keystone_capability_registry +package capabilities_registry import ( "errors" @@ -30,7 +30,7 @@ var ( _ = abi.ConvertType ) -type CapabilityRegistryCapability struct { +type CapabilitiesRegistryCapability struct { LabelledName string Version string CapabilityType uint8 @@ -38,22 +38,22 @@ type CapabilityRegistryCapability struct { ConfigurationContract common.Address } -type CapabilityRegistryCapabilityConfiguration struct { +type CapabilitiesRegistryCapabilityConfiguration struct { CapabilityId [32]byte Config []byte } -type CapabilityRegistryDONInfo struct { +type CapabilitiesRegistryDONInfo struct { Id uint32 ConfigCount uint32 F uint8 IsPublic bool AcceptsWorkflows bool NodeP2PIds [][32]byte - CapabilityConfigurations []CapabilityRegistryCapabilityConfiguration + CapabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration } -type CapabilityRegistryNodeInfo struct { +type CapabilitiesRegistryNodeInfo struct { NodeOperatorId uint32 ConfigCount uint32 WorkflowDONId uint32 @@ -63,29 +63,29 @@ type CapabilityRegistryNodeInfo struct { CapabilitiesDONIds []*big.Int } -type CapabilityRegistryNodeOperator struct { +type CapabilitiesRegistryNodeOperator struct { Admin common.Address Name string } -type CapabilityRegistryNodeParams struct { +type CapabilitiesRegistryNodeParams struct { NodeOperatorId uint32 Signer [32]byte P2pId [32]byte HashedCapabilityIds [][32]byte } -var CapabilityRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"nodeCount\",\"type\":\"uint256\"}],\"name\":\"InvalidFaultTolerance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"InvalidNodeCapabilities\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeOperatorAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"InvalidNodeP2PId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lengthOne\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lengthTwo\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfCapabilitiesDON\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfWorkflowDON\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDeprecated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"name\":\"addCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"addDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"addNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"addNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"deprecateCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilities\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedId\",\"type\":\"bytes32\"}],\"name\":\"getCapability\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilityRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilityRegistry.Capability\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getCapabilityConfigs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilityRegistry.DONInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"getHashedCapabilityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"getNode\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo\",\"name\":\"nodeInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"getNodeOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeOperators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodes\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilityRegistry.NodeInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"isCapabilityDeprecated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"donIds\",\"type\":\"uint32[]\"}],\"name\":\"removeDONs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"}],\"name\":\"removeNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"removedNodeP2PIds\",\"type\":\"bytes32[]\"}],\"name\":\"removeNodes\",\"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\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilityRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilityRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"updateNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilityRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052600e80546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6150bf80620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635e65e309116100ee5780638da5cb5b11610097578063d8bc7b6811610071578063d8bc7b68146103f6578063ddbe4f8214610409578063e29581aa1461041f578063f2fde38b1461043457600080fd5b80638da5cb5b1461039b5780639cb7c5f4146103c3578063d59a79f6146103e357600080fd5b806373ac22b4116100c857806373ac22b41461036d57806379ba50971461038057806386fa42461461038857600080fd5b80635e65e3091461033257806366acaa3314610345578063715f52951461035a57600080fd5b8063235374051161015b578063398f377311610135578063398f3773146102cb5780633f2a13c9146102de57806350c946fe146102ff5780635d83d9671461031f57600080fd5b80632353740514610285578063275459f2146102a55780632c01a1e8146102b857600080fd5b80631d05394c1161018c5780631d05394c1461023b578063214502431461025057806322bdbcbc1461026557600080fd5b80630fe5800a146101b357806312570011146101d9578063181f5a77146101fc575b600080fd5b6101c66101c1366004613ef4565b610447565b6040519081526020015b60405180910390f35b6101ec6101e7366004613f58565b61047b565b60405190151581526020016101d0565b604080518082018252601881527f4361706162696c697479526567697374727920312e302e300000000000000000602082015290516101d09190613fdf565b61024e610249366004614037565b610488565b005b6102586106ab565b6040516101d09190614197565b610278610273366004614230565b610810565b6040516101d09190614288565b610298610293366004614230565b6108fd565b6040516101d0919061429b565b61024e6102b3366004614037565b610941565b61024e6102c6366004614037565b610a18565b61024e6102d9366004614037565b610cbd565b6102f16102ec3660046142ae565b610e85565b6040516101d09291906142d8565b61031261030d366004613f58565b611071565b6040516101d09190614369565b61024e61032d366004614037565b61114b565b61024e610340366004614037565b611299565b61034d611718565b6040516101d0919061437c565b61024e610368366004614037565b611903565b61024e61037b366004614037565b6119be565b61024e611e9a565b61024e6103963660046143ef565b611f97565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d0565b6103d66103d1366004613f58565b6122dd565b6040516101d09190614517565b61024e6103f1366004614549565b6124e2565b61024e6104043660046145fe565b6125ab565b610411612675565b6040516101d09291906146a3565b6104276129d8565b6040516101d09190614733565b61024e6104423660046147ca565b612aea565b6000828260405160200161045c9291906142d8565b6040516020818303038152906040528051906020012090505b92915050565b6000610475600583612afe565b610490612b19565b60005b818110156106a65760008383838181106104af576104af6147e5565b90506020020160208101906104c49190614230565b63ffffffff8181166000908152600d60209081526040808320805464010000000081049095168085526001820190935290832094955093909290916a010000000000000000000090910460ff16905b61051c83612b9c565b8110156105c457811561057257600c60006105378584612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556105b4565b6105b28663ffffffff16600c60006105938588612ba690919063ffffffff16565b8152602001908152602001600020600401612bb290919063ffffffff16565b505b6105bd81614843565b9050610513565b508354640100000000900463ffffffff1660000361061b576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff861660048201526024015b60405180910390fd5b63ffffffff85166000818152600d6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000001690558051938452908301919091527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a150505050508061069f90614843565b9050610493565b505050565b600e54606090640100000000900463ffffffff1660006106cc60018361487b565b63ffffffff1667ffffffffffffffff8111156106ea576106ea613d8e565b60405190808252806020026020018201604052801561077157816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816107085790505b509050600060015b8363ffffffff168163ffffffff1610156107ed5763ffffffff8082166000908152600d602052604090205416156107dd576107b381612bbe565b8383815181106107c5576107c56147e5565b6020026020010181905250816107da90614843565b91505b6107e681614898565b9050610779565b506107f960018461487b565b63ffffffff168114610809578082525b5092915050565b60408051808201909152600081526060602082015263ffffffff82166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191610874906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546108a0906148bb565b80156108ed5780601f106108c2576101008083540402835291602001916108ed565b820191906000526020600020905b8154815290600101906020018083116108d057829003601f168201915b5050505050815250509050919050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c081019190915261047582612bbe565b610949612b19565b60005b63ffffffff81168211156106a657600083838363ffffffff16818110610974576109746147e5565b90506020020160208101906109899190614230565b63ffffffff81166000908152600b6020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681559192506109d46001830182613d21565b505060405163ffffffff8216907fa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a90600090a250610a1181614898565b905061094c565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb7576000848483818110610a5257610a526147e5565b602090810292909201356000818152600c90935260409092206001810154929350919050610aaf576040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260048101839052602401610612565b6000610abd82600401612b9c565b1115610b1257610ad06004820184612ba6565b6040517f60a6d89800000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260248101839052604401610612565b805468010000000000000000900463ffffffff1615610b7a5780546040517f60b9df730000000000000000000000000000000000000000000000000000000081526801000000000000000090910463ffffffff16600482015260248101839052604401610612565b83158015610bb45750805463ffffffff166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15610bed576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6001810154610bfe90600790612bb2565b506002810154610c1090600990612bb2565b506000828152600c6020526040812080547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815560018101829055600281018290559060048201818181610c658282613d5b565b5050505050507f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320582604051610c9c91815260200190565b60405180910390a1505080610cb090614843565b9050610a36565b50505050565b610cc5612b19565b60005b818110156106a6576000838383818110610ce457610ce46147e5565b9050602002810190610cf6919061490e565b610cff9061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16610d50576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e54604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600b909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610ddc9082614a04565b5050600e8054909150600090610df79063ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff168163ffffffff167f78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e8460200151604051610e6a9190613fdf565b60405180910390a3505080610e7e90614843565b9050610cc8565b63ffffffff8083166000908152600d60209081526040808320805464010000000090049094168084526001909401825280832085845260030190915281208054606093849390929091610ed7906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610f03906148bb565b8015610f505780601f10610f2557610100808354040283529160200191610f50565b820191906000526020600020905b815481529060010190602001808311610f3357829003601f168201915b5050506000888152600260208190526040909120015492935060609262010000900473ffffffffffffffffffffffffffffffffffffffff16159150611063905057600086815260026020819052604091829020015490517f8318ed5d00000000000000000000000000000000000000000000000000000000815263ffffffff891660048201526201000090910473ffffffffffffffffffffffffffffffffffffffff1690638318ed5d90602401600060405180830381865afa15801561101a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526110609190810190614b1e565b90505b9093509150505b9250929050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c08101919091526040805160e0810182526000848152600c6020908152838220805463ffffffff8082168652640100000000820481168487018190526801000000000000000090920416858701526001820154606086015260028201546080860152835260030190529190912060a082019061112090612e92565b8152602001611143600c6000868152602001908152602001600020600401612e92565b905292915050565b611153612b19565b60005b818110156106a6576000838383818110611172576111726147e5565b90506020020135905061118f816003612afe90919063ffffffff16565b6111c8576040517fe181733f00000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6111d3600582612e9f565b61120c576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6000818152600260205260408120906112258282613d21565b611233600183016000613d21565b5060020180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a25061129281614843565b9050611156565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106112d3576112d36147e5565b90506020028101906112e59190614b8c565b6112ee90614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611344906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611370906148bb565b80156113bd5780601f10611392576101008083540402835291602001916113bd565b820191906000526020600020905b8154815290600101906020018083116113a057829003601f168201915b5050505050815250509050831580156113ed5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611426576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015461147a5782604001516040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301516114b5576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154602084015181146115365760208401516114d690600790612afe565b1561150d576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208401516001830155611522600782612bb2565b50602084015161153490600790612e9f565b505b6060840151805160000361157857806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b8254600090849060049061159990640100000000900463ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff1602179055905060005b8251811015611686576115f18382815181106115d9576115d96147e5565b60200260200101516003612afe90919063ffffffff16565b61162957826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b61167583828151811061163e5761163e6147e5565b60200260200101518660030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b5061167f81614843565b90506115bb565b50855184547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9091169081178555604080880151600287018190556020808a01518351928352908201527f4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b910160405180910390a25050505050508061171190614843565b90506112b7565b600e5460609063ffffffff16600061173160018361487b565b63ffffffff1667ffffffffffffffff81111561174f5761174f613d8e565b60405190808252806020026020018201604052801561179557816020015b60408051808201909152600081526060602082015281526020019060019003908161176d5790505b509050600060015b8363ffffffff168163ffffffff1610156118ed5763ffffffff81166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16156118dd5763ffffffff81166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191611831906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461185d906148bb565b80156118aa5780601f1061187f576101008083540402835291602001916118aa565b820191906000526020600020905b81548152906001019060200180831161188d57829003601f168201915b5050505050815250508383815181106118c5576118c56147e5565b6020026020010181905250816118da90614843565b91505b6118e681614898565b905061179d565b50600e546107f99060019063ffffffff1661487b565b61190b612b19565b60005b818110156106a657600083838381811061192a5761192a6147e5565b905060200281019061193c9190614ca6565b61194590614ce9565b9050600061195b82600001518360200151610447565b9050611968600382612e9f565b6119a1576040517febf5255100000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6119ab8183612eab565b5050806119b790614843565b905061190e565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106119f8576119f86147e5565b9050602002810190611a0a9190614b8c565b611a1390614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611a69906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611a95906148bb565b8015611ae25780601f10611ab757610100808354040283529160200191611ae2565b820191906000526020600020905b815481529060010190602001808311611ac557829003601f168201915b50505091909252505081519192505073ffffffffffffffffffffffffffffffffffffffff16611b485781516040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff9091166004820152602401610612565b83158015611b6d5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611ba6576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015415611bfb5782604001516040517f5461848300000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b6040830151611c3e5782604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301511580611c5b57506020830151611c5b90600790612afe565b15611c92576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608301518051600003611cd457806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b81548290600490611cf290640100000000900463ffffffff16614898565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041660005b8251811015611dd057611d3b8382815181106115d9576115d96147e5565b611d7357826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b611dbf838281518110611d8857611d886147e5565b60200260200101518560030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b50611dc981614843565b9050611d1d565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff91821617845560408601516002850155602086015160018501819055611e269160079190612e9f16565b506040850151611e3890600990612e9f565b50845160408087015160208089015183519283529082015263ffffffff909216917f74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05910160405180910390a2505050505080611e9390614843565b90506119dc565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610612565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b828114611fda576040517fab8b67c60000000000000000000000000000000000000000000000000000000081526004810184905260248101829052604401610612565b6000805473ffffffffffffffffffffffffffffffffffffffff16905b848110156122d5576000868683818110612012576120126147e5565b90506020020160208101906120279190614230565b63ffffffff81166000908152600b6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff16612096576040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152602401610612565b60008686858181106120aa576120aa6147e5565b90506020028101906120bc919061490e565b6120c59061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16612116576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16331480159061215357503373ffffffffffffffffffffffffffffffffffffffff861614155b1561218c576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b8051825473ffffffffffffffffffffffffffffffffffffffff908116911614158061220857506020808201516040516121c59201613fdf565b60405160208183030381529060405280519060200120826001016040516020016121ef9190614d8f565b6040516020818303038152906040528051906020012014155b156122c157805182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602081015160018301906122629082614a04565b50806000015173ffffffffffffffffffffffffffffffffffffffff168363ffffffff167f86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a2883602001516040516122b89190613fdf565b60405180910390a35b505050806122ce90614843565b9050611ff6565b505050505050565b61230d6040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b60008281526002602052604090819020815160a08101909252805482908290612335906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612361906148bb565b80156123ae5780601f10612383576101008083540402835291602001916123ae565b820191906000526020600020905b81548152906001019060200180831161239157829003601f168201915b505050505081526020016001820180546123c7906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546123f3906148bb565b80156124405780601f1061241557610100808354040283529160200191612440565b820191906000526020600020905b81548152906001019060200180831161242357829003601f168201915b5050509183525050600282015460209091019060ff1660038111156124675761246761445b565b60038111156124785761247861445b565b81526020016002820160019054906101000a900460ff1660018111156124a0576124a061445b565b60018111156124b1576124b161445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b6124ea612b19565b63ffffffff8089166000908152600d602052604081205464010000000090049091169081900361254e576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a166004820152602401610612565b6125a0888888886040518060a001604052808f63ffffffff1681526020018761257690614898565b97508763ffffffff1681526020018a1515815260200189151581526020018860ff1681525061313f565b505050505050505050565b6125b3612b19565b600e805460009164010000000090910463ffffffff169060046125d583614898565b82546101009290920a63ffffffff81810219909316918316021790915581166000818152600d602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a08101835292835260019083015286151590820152841515606082015260ff8416608082015290915061266b90899089908990899061313f565b5050505050505050565b6060806126826003612e92565b915060006126906005612b9c565b835161269c9190614e38565b90508067ffffffffffffffff8111156126b7576126b7613d8e565b60405190808252806020026020018201604052801561271857816020015b6127056040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b8152602001906001900390816126d55790505b50915060008167ffffffffffffffff81111561273657612736613d8e565b60405190808252806020026020018201604052801561275f578160200160208202803683370190505b5090506000805b85518110156129ce576000868281518110612783576127836147e5565b602002602001015190506127a1816005612afe90919063ffffffff16565b6129bd5760008181526002602052604090819020815160a081019092528054829082906127cd906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546127f9906148bb565b80156128465780601f1061281b57610100808354040283529160200191612846565b820191906000526020600020905b81548152906001019060200180831161282957829003601f168201915b5050505050815260200160018201805461285f906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461288b906148bb565b80156128d85780601f106128ad576101008083540402835291602001916128d8565b820191906000526020600020905b8154815290600101906020018083116128bb57829003601f168201915b5050509183525050600282015460209091019060ff1660038111156128ff576128ff61445b565b60038111156129105761291061445b565b81526020016002820160019054906101000a900460ff1660018111156129385761293861445b565b60018111156129495761294961445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff166020909101528651879085908110612988576129886147e5565b6020026020010181905250808484815181106129a6576129a66147e5565b60209081029190910101526129ba83614843565b92505b506129c781614843565b9050612766565b5090949293505050565b606060006129e66009612e92565b90506000815167ffffffffffffffff811115612a0457612a04613d8e565b604051908082528060200260200182016040528015612a8b57816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181612a225790505b50905060005b825181101561080957612abc838281518110612aaf57612aaf6147e5565b6020026020010151611071565b828281518110612ace57612ace6147e5565b602002602001018190525080612ae390614843565b9050612a91565b612af2612b19565b612afb81613983565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610612565b565b6000610475825490565b6000612b128383613a78565b6000612b128383613aa2565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff8581168352600d8252848320805464010000000090049091168084526001909101825284832060028101805487518186028101860190985280885295969295919493909190830182828015612c6f57602002820191906000526020600020905b815481526020019060010190808311612c5b575b505050505090506000815167ffffffffffffffff811115612c9257612c92613d8e565b604051908082528060200260200182016040528015612cd857816020015b604080518082019091526000815260606020820152815260200190600190039081612cb05790505b50905060005b8151811015612df9576040518060400160405280848381518110612d0457612d046147e5565b60200260200101518152602001856003016000868581518110612d2957612d296147e5565b602002602001015181526020019081526020016000208054612d4a906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612d76906148bb565b8015612dc35780601f10612d9857610100808354040283529160200191612dc3565b820191906000526020600020905b815481529060010190602001808311612da657829003601f168201915b5050505050815250828281518110612ddd57612ddd6147e5565b602002602001018190525080612df290614843565b9050612cde565b506040805160e08101825263ffffffff8089166000818152600d6020818152868320548086168752948b168187015260ff680100000000000000008604811697870197909752690100000000000000000085048716151560608701529290915290526a010000000000000000000090049091161515608082015260a08101612e8085612e92565b81526020019190915295945050505050565b60606000612b1283613b95565b6000612b128383613bf1565b608081015173ffffffffffffffffffffffffffffffffffffffff1615612ff957608081015173ffffffffffffffffffffffffffffffffffffffff163b1580612fa4575060808101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f78bea72100000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff909116906301ffc9a790602401602060405180830381865afa158015612f7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa29190614e4b565b155b15612ff95760808101516040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610612565b6000828152600260205260409020815182919081906130189082614a04565b506020820151600182019061302d9082614a04565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600183600381111561306f5761306f61445b565b021790555060608201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360018111156130b6576130b661445b565b0217905550608091909101516002909101805473ffffffffffffffffffffffffffffffffffffffff90921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405182907f04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae90600090a25050565b805163ffffffff9081166000908152600d602090815260408083208286015190941683526001909301905220608082015160ff16158061319157506080820151859061318c906001614e68565b60ff16115b156131da5760808201516040517f25b4d61800000000000000000000000000000000000000000000000000000000815260ff909116600482015260248101869052604401610612565b6001826020015163ffffffff1611156132ca57815163ffffffff166000908152600d60209081526040822090840151600191820191839161321b919061487b565b63ffffffff1663ffffffff168152602001908152602001600020905060005b61324382612b9c565b8110156132c757613272846000015163ffffffff16600c60006105938587600001612ba690919063ffffffff16565b50600c60006132818484612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556132c081614843565b905061323a565b50505b60005b8581101561350c576132fa8787838181106132ea576132ea6147e5565b8592602090910201359050612e9f565b61335b578251878783818110613312576133126147e5565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8260600151156134b257825163ffffffff16600c6000898985818110613383576133836147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff16148015906133fd5750600c60008888848181106133ce576133ce6147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff1615155b1561345f578251878783818110613416576134166147e5565b6040517f60b9df7300000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8251600c6000898985818110613477576134776147e5565b90506020020135815260200190815260200160002060000160086101000a81548163ffffffff021916908363ffffffff1602179055506134fc565b82516134fa9063ffffffff16600c60008a8a868181106134d4576134d46147e5565b905060200201358152602001908152602001600020600401612e9f90919063ffffffff16565b505b61350581614843565b90506132cd565b5060005b838110156137f8573685858381811061352b5761352b6147e5565b905060200281019061353d919061490e565b905061354b60038235612afe565b613584576040517fe181733f00000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b61359060058235612afe565b156135ca576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b80356000908152600384016020526040812080546135e7906148bb565b905011156136335783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015281356024820152604401610612565b60005b87811015613745576136da8235600c60008c8c86818110613659576136596147e5565b9050602002013581526020019081526020016000206003016000600c60008e8e88818110613689576136896147e5565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020612afe90919063ffffffff16565b613735578888828181106136f0576136f06147e5565b6040517fa7e792500000000000000000000000000000000000000000000000000000000081526020909102929092013560048301525082356024820152604401610612565b61373e81614843565b9050613636565b506002830180546001810182556000918252602091829020833591015561376e90820182614e81565b8235600090815260038601602052604090209161378c919083614ee6565b5083516020808601516137e792918435908c908c906137ad90880188614e81565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613c4092505050565b506137f181614843565b9050613510565b50604080830151835163ffffffff9081166000908152600d602090815284822080549415156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff90951694909417909355606086015186518316825284822080549115156a0100000000000000000000027fffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffff9092169190911790556080860151865183168252848220805460ff9290921668010000000000000000027fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c158170365192613973929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613a02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610612565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110613a8f57613a8f6147e5565b9060005260206000200154905092915050565b60008181526001830160205260408120548015613b8b576000613ac6600183614e38565b8554909150600090613ada90600190614e38565b9050818114613b3f576000866000018281548110613afa57613afa6147e5565b9060005260206000200154905080876000018481548110613b1d57613b1d6147e5565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b5057613b50615001565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610475565b6000915050610475565b606081600001805480602002602001604051908101604052809291908181526020018280548015613be557602002820191906000526020600020905b815481526020019060010190808311613bd1575b50505050509050919050565b6000818152600183016020526040812054613c3857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610475565b506000610475565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff16156122d557600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c90613ce7908690869086908b908d90600401615030565b600060405180830381600087803b158015613d0157600080fd5b505af1158015613d15573d6000803e3d6000fd5b50505050505050505050565b508054613d2d906148bb565b6000825580601f10613d3d575050565b601f016020900490600052602060002090810190612afb9190613d75565b5080546000825590600052602060002090810190612afb91905b5b80821115613d8a5760008155600101613d76565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715613de057613de0613d8e565b60405290565b60405160a0810167ffffffffffffffff81118282101715613de057613de0613d8e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613e5057613e50613d8e565b604052919050565b600067ffffffffffffffff821115613e7257613e72613d8e565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613eaf57600080fd5b8135613ec2613ebd82613e58565b613e09565b818152846020838601011115613ed757600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613f0757600080fd5b823567ffffffffffffffff80821115613f1f57600080fd5b613f2b86838701613e9e565b93506020850135915080821115613f4157600080fd5b50613f4e85828601613e9e565b9150509250929050565b600060208284031215613f6a57600080fd5b5035919050565b60005b83811015613f8c578181015183820152602001613f74565b50506000910152565b60008151808452613fad816020860160208601613f71565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612b126020830184613f95565b60008083601f84011261400457600080fd5b50813567ffffffffffffffff81111561401c57600080fd5b6020830191508360208260051b850101111561106a57600080fd5b6000806020838503121561404a57600080fd5b823567ffffffffffffffff81111561406157600080fd5b61406d85828601613ff2565b90969095509350505050565b600081518084526020808501945080840160005b838110156140a95781518752958201959082019060010161408d565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b8581101561411057828403895281518051855285015160408686018190526140fc81870183613f95565b9a87019a95505050908401906001016140d2565b5091979650505050505050565b600063ffffffff8083511684528060208401511660208501525060ff604083015116604084015260608201511515606084015260808201511515608084015260a082015160e060a085015261417560e0850182614079565b905060c083015184820360c086015261418e82826140b4565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526141f885835161411d565b945092850192908501906001016141be565b5092979650505050505050565b803563ffffffff8116811461422b57600080fd5b919050565b60006020828403121561424257600080fd5b612b1282614217565b73ffffffffffffffffffffffffffffffffffffffff815116825260006020820151604060208501526142806040850182613f95565b949350505050565b602081526000612b12602083018461424b565b602081526000612b12602083018461411d565b600080604083850312156142c157600080fd5b6142ca83614217565b946020939093013593505050565b6040815260006142eb6040830185613f95565b828103602084015261418e8185613f95565b600063ffffffff80835116845280602084015116602085015280604084015116604085015250606082015160608401526080820151608084015260a082015160e060a085015261435060e0850182614079565b905060c083015184820360c086015261418e8282614079565b602081526000612b1260208301846142fd565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526143dd85835161424b565b945092850192908501906001016143a3565b6000806000806040858703121561440557600080fd5b843567ffffffffffffffff8082111561441d57600080fd5b61442988838901613ff2565b9096509450602087013591508082111561444257600080fd5b5061444f87828801613ff2565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160a0845261449f60a0850182613f95565b9050602083015184820360208601526144b88282613f95565b9150506040830151600481106144d0576144d061445b565b60408501526060830151600281106144ea576144ea61445b565b606085015260809283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b602081526000612b12602083018461448a565b8015158114612afb57600080fd5b803560ff8116811461422b57600080fd5b60008060008060008060008060c0898b03121561456557600080fd5b61456e89614217565b9750602089013567ffffffffffffffff8082111561458b57600080fd5b6145978c838d01613ff2565b909950975060408b01359150808211156145b057600080fd5b506145bd8b828c01613ff2565b90965094505060608901356145d18161452a565b925060808901356145e18161452a565b91506145ef60a08a01614538565b90509295985092959890939650565b600080600080600080600060a0888a03121561461957600080fd5b873567ffffffffffffffff8082111561463157600080fd5b61463d8b838c01613ff2565b909950975060208a013591508082111561465657600080fd5b506146638a828b01613ff2565b90965094505060408801356146778161452a565b925060608801356146878161452a565b915061469560808901614538565b905092959891949750929550565b6040815260006146b66040830185614079565b6020838203818501528185518084528284019150828160051b85010183880160005b83811015614724577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087840301855261471283835161448a565b948601949250908501906001016146d8565b50909998505050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526147948583516142fd565b9450928501929085019060010161475a565b803573ffffffffffffffffffffffffffffffffffffffff8116811461422b57600080fd5b6000602082840312156147dc57600080fd5b612b12826147a6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361487457614874614814565b5060010190565b63ffffffff82811682821603908082111561080957610809614814565b600063ffffffff8083168181036148b1576148b1614814565b6001019392505050565b600181811c908216806148cf57607f821691505b602082108103614908577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261494257600080fd5b9190910192915050565b60006040823603121561495e57600080fd5b6040516040810167ffffffffffffffff828210818311171561498257614982613d8e565b8160405261498f856147a6565b835260208501359150808211156149a557600080fd5b506149b236828601613e9e565b60208301525092915050565b601f8211156106a657600081815260208120601f850160051c810160208610156149e55750805b601f850160051c820191505b818110156122d5578281556001016149f1565b815167ffffffffffffffff811115614a1e57614a1e613d8e565b614a3281614a2c84546148bb565b846149be565b602080601f831160018114614a855760008415614a4f5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556122d5565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015614ad257888601518255948401946001909101908401614ab3565b5085821015614b0e57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614b3057600080fd5b815167ffffffffffffffff811115614b4757600080fd5b8201601f81018413614b5857600080fd5b8051614b66613ebd82613e58565b818152856020838501011115614b7b57600080fd5b61418e826020830160208601613f71565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261494257600080fd5b600060808236031215614bd257600080fd5b614bda613dbd565b614be383614217565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff80821115614c1457600080fd5b9085019036601f830112614c2757600080fd5b813581811115614c3957614c39613d8e565b8060051b9150614c4a848301613e09565b8181529183018401918481019036841115614c6457600080fd5b938501935b83851015614c8257843582529385019390850190614c69565b606087015250939695505050505050565b602081526000612b126020830184614079565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6183360301811261494257600080fd5b80356002811061422b57600080fd5b600060a08236031215614cfb57600080fd5b614d03613de6565b823567ffffffffffffffff80821115614d1b57600080fd5b614d2736838701613e9e565b83526020850135915080821115614d3d57600080fd5b50614d4a36828601613e9e565b602083015250604083013560048110614d6257600080fd5b6040820152614d7360608401614cda565b6060820152614d84608084016147a6565b608082015292915050565b6000602080835260008454614da3816148bb565b80848701526040600180841660008114614dc45760018114614dfc57614e2a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614e2a565b896000528660002060005b85811015614e225781548b8201860152908301908801614e07565b8a0184019650505b509398975050505050505050565b8181038181111561047557610475614814565b600060208284031215614e5d57600080fd5b8151612b128161452a565b60ff818116838216019081111561047557610475614814565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614eb657600080fd5b83018035915067ffffffffffffffff821115614ed157600080fd5b60200191503681900382131561106a57600080fd5b67ffffffffffffffff831115614efe57614efe613d8e565b614f1283614f0c83546148bb565b836149be565b6000601f841160018114614f645760008515614f2e5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614ffa565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614fb35786850135825560209485019460019092019101614f93565b5086821015614fee577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86111561506957600080fd5b8560051b808860a0850137820182810360a0908101602085015261508f90820187613f95565b91505063ffffffff8085166040840152808416606084015250969550505050505056fea164736f6c6343000813000a", +var CapabilitiesRegistryMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"nodeCount\",\"type\":\"uint256\"}],\"name\":\"InvalidFaultTolerance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"InvalidNodeCapabilities\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeOperatorAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"InvalidNodeP2PId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lengthOne\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lengthTwo\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfCapabilitiesDON\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfWorkflowDON\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDeprecated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilitiesRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"name\":\"addCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"addDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"addNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"addNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"deprecateCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilities\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilitiesRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedId\",\"type\":\"bytes32\"}],\"name\":\"getCapability\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilitiesRegistry.Capability\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getCapabilityConfigs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilitiesRegistry.DONInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilitiesRegistry.DONInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"getHashedCapabilityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"getNode\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeInfo\",\"name\":\"nodeInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"getNodeOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeOperators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodes\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"isCapabilityDeprecated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"donIds\",\"type\":\"uint32[]\"}],\"name\":\"removeDONs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"}],\"name\":\"removeNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"removedNodeP2PIds\",\"type\":\"bytes32[]\"}],\"name\":\"removeNodes\",\"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\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"updateNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052600e80546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6150bf80620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635e65e309116100ee5780638da5cb5b11610097578063d8bc7b6811610071578063d8bc7b68146103f6578063ddbe4f8214610409578063e29581aa1461041f578063f2fde38b1461043457600080fd5b80638da5cb5b1461039b5780639cb7c5f4146103c3578063d59a79f6146103e357600080fd5b806373ac22b4116100c857806373ac22b41461036d57806379ba50971461038057806386fa42461461038857600080fd5b80635e65e3091461033257806366acaa3314610345578063715f52951461035a57600080fd5b8063235374051161015b578063398f377311610135578063398f3773146102cb5780633f2a13c9146102de57806350c946fe146102ff5780635d83d9671461031f57600080fd5b80632353740514610285578063275459f2146102a55780632c01a1e8146102b857600080fd5b80631d05394c1161018c5780631d05394c1461023b578063214502431461025057806322bdbcbc1461026557600080fd5b80630fe5800a146101b357806312570011146101d9578063181f5a77146101fc575b600080fd5b6101c66101c1366004613ef4565b610447565b6040519081526020015b60405180910390f35b6101ec6101e7366004613f58565b61047b565b60405190151581526020016101d0565b604080518082018252601a81527f4361706162696c6974696573526567697374727920312e302e30000000000000602082015290516101d09190613fdf565b61024e610249366004614037565b610488565b005b6102586106ab565b6040516101d09190614197565b610278610273366004614230565b610810565b6040516101d09190614288565b610298610293366004614230565b6108fd565b6040516101d0919061429b565b61024e6102b3366004614037565b610941565b61024e6102c6366004614037565b610a18565b61024e6102d9366004614037565b610cbd565b6102f16102ec3660046142ae565b610e85565b6040516101d09291906142d8565b61031261030d366004613f58565b611071565b6040516101d09190614369565b61024e61032d366004614037565b61114b565b61024e610340366004614037565b611299565b61034d611718565b6040516101d0919061437c565b61024e610368366004614037565b611903565b61024e61037b366004614037565b6119be565b61024e611e9a565b61024e6103963660046143ef565b611f97565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d0565b6103d66103d1366004613f58565b6122dd565b6040516101d09190614517565b61024e6103f1366004614549565b6124e2565b61024e6104043660046145fe565b6125ab565b610411612675565b6040516101d09291906146a3565b6104276129d8565b6040516101d09190614733565b61024e6104423660046147ca565b612aea565b6000828260405160200161045c9291906142d8565b6040516020818303038152906040528051906020012090505b92915050565b6000610475600583612afe565b610490612b19565b60005b818110156106a65760008383838181106104af576104af6147e5565b90506020020160208101906104c49190614230565b63ffffffff8181166000908152600d60209081526040808320805464010000000081049095168085526001820190935290832094955093909290916a010000000000000000000090910460ff16905b61051c83612b9c565b8110156105c457811561057257600c60006105378584612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556105b4565b6105b28663ffffffff16600c60006105938588612ba690919063ffffffff16565b8152602001908152602001600020600401612bb290919063ffffffff16565b505b6105bd81614843565b9050610513565b508354640100000000900463ffffffff1660000361061b576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff861660048201526024015b60405180910390fd5b63ffffffff85166000818152600d6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000001690558051938452908301919091527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a150505050508061069f90614843565b9050610493565b505050565b600e54606090640100000000900463ffffffff1660006106cc60018361487b565b63ffffffff1667ffffffffffffffff8111156106ea576106ea613d8e565b60405190808252806020026020018201604052801561077157816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816107085790505b509050600060015b8363ffffffff168163ffffffff1610156107ed5763ffffffff8082166000908152600d602052604090205416156107dd576107b381612bbe565b8383815181106107c5576107c56147e5565b6020026020010181905250816107da90614843565b91505b6107e681614898565b9050610779565b506107f960018461487b565b63ffffffff168114610809578082525b5092915050565b60408051808201909152600081526060602082015263ffffffff82166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191610874906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546108a0906148bb565b80156108ed5780601f106108c2576101008083540402835291602001916108ed565b820191906000526020600020905b8154815290600101906020018083116108d057829003601f168201915b5050505050815250509050919050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c081019190915261047582612bbe565b610949612b19565b60005b63ffffffff81168211156106a657600083838363ffffffff16818110610974576109746147e5565b90506020020160208101906109899190614230565b63ffffffff81166000908152600b6020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681559192506109d46001830182613d21565b505060405163ffffffff8216907fa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a90600090a250610a1181614898565b905061094c565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb7576000848483818110610a5257610a526147e5565b602090810292909201356000818152600c90935260409092206001810154929350919050610aaf576040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260048101839052602401610612565b6000610abd82600401612b9c565b1115610b1257610ad06004820184612ba6565b6040517f60a6d89800000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260248101839052604401610612565b805468010000000000000000900463ffffffff1615610b7a5780546040517f60b9df730000000000000000000000000000000000000000000000000000000081526801000000000000000090910463ffffffff16600482015260248101839052604401610612565b83158015610bb45750805463ffffffff166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15610bed576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6001810154610bfe90600790612bb2565b506002810154610c1090600990612bb2565b506000828152600c6020526040812080547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815560018101829055600281018290559060048201818181610c658282613d5b565b5050505050507f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320582604051610c9c91815260200190565b60405180910390a1505080610cb090614843565b9050610a36565b50505050565b610cc5612b19565b60005b818110156106a6576000838383818110610ce457610ce46147e5565b9050602002810190610cf6919061490e565b610cff9061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16610d50576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e54604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600b909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610ddc9082614a04565b5050600e8054909150600090610df79063ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff168163ffffffff167f78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e8460200151604051610e6a9190613fdf565b60405180910390a3505080610e7e90614843565b9050610cc8565b63ffffffff8083166000908152600d60209081526040808320805464010000000090049094168084526001909401825280832085845260030190915281208054606093849390929091610ed7906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610f03906148bb565b8015610f505780601f10610f2557610100808354040283529160200191610f50565b820191906000526020600020905b815481529060010190602001808311610f3357829003601f168201915b5050506000888152600260208190526040909120015492935060609262010000900473ffffffffffffffffffffffffffffffffffffffff16159150611063905057600086815260026020819052604091829020015490517f8318ed5d00000000000000000000000000000000000000000000000000000000815263ffffffff891660048201526201000090910473ffffffffffffffffffffffffffffffffffffffff1690638318ed5d90602401600060405180830381865afa15801561101a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526110609190810190614b1e565b90505b9093509150505b9250929050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c08101919091526040805160e0810182526000848152600c6020908152838220805463ffffffff8082168652640100000000820481168487018190526801000000000000000090920416858701526001820154606086015260028201546080860152835260030190529190912060a082019061112090612e92565b8152602001611143600c6000868152602001908152602001600020600401612e92565b905292915050565b611153612b19565b60005b818110156106a6576000838383818110611172576111726147e5565b90506020020135905061118f816003612afe90919063ffffffff16565b6111c8576040517fe181733f00000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6111d3600582612e9f565b61120c576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6000818152600260205260408120906112258282613d21565b611233600183016000613d21565b5060020180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a25061129281614843565b9050611156565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106112d3576112d36147e5565b90506020028101906112e59190614b8c565b6112ee90614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611344906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611370906148bb565b80156113bd5780601f10611392576101008083540402835291602001916113bd565b820191906000526020600020905b8154815290600101906020018083116113a057829003601f168201915b5050505050815250509050831580156113ed5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611426576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015461147a5782604001516040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301516114b5576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154602084015181146115365760208401516114d690600790612afe565b1561150d576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208401516001830155611522600782612bb2565b50602084015161153490600790612e9f565b505b6060840151805160000361157857806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b8254600090849060049061159990640100000000900463ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff1602179055905060005b8251811015611686576115f18382815181106115d9576115d96147e5565b60200260200101516003612afe90919063ffffffff16565b61162957826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b61167583828151811061163e5761163e6147e5565b60200260200101518660030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b5061167f81614843565b90506115bb565b50855184547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9091169081178555604080880151600287018190556020808a01518351928352908201527f4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b910160405180910390a25050505050508061171190614843565b90506112b7565b600e5460609063ffffffff16600061173160018361487b565b63ffffffff1667ffffffffffffffff81111561174f5761174f613d8e565b60405190808252806020026020018201604052801561179557816020015b60408051808201909152600081526060602082015281526020019060019003908161176d5790505b509050600060015b8363ffffffff168163ffffffff1610156118ed5763ffffffff81166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16156118dd5763ffffffff81166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191611831906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461185d906148bb565b80156118aa5780601f1061187f576101008083540402835291602001916118aa565b820191906000526020600020905b81548152906001019060200180831161188d57829003601f168201915b5050505050815250508383815181106118c5576118c56147e5565b6020026020010181905250816118da90614843565b91505b6118e681614898565b905061179d565b50600e546107f99060019063ffffffff1661487b565b61190b612b19565b60005b818110156106a657600083838381811061192a5761192a6147e5565b905060200281019061193c9190614ca6565b61194590614ce9565b9050600061195b82600001518360200151610447565b9050611968600382612e9f565b6119a1576040517febf5255100000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6119ab8183612eab565b5050806119b790614843565b905061190e565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106119f8576119f86147e5565b9050602002810190611a0a9190614b8c565b611a1390614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611a69906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611a95906148bb565b8015611ae25780601f10611ab757610100808354040283529160200191611ae2565b820191906000526020600020905b815481529060010190602001808311611ac557829003601f168201915b50505091909252505081519192505073ffffffffffffffffffffffffffffffffffffffff16611b485781516040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff9091166004820152602401610612565b83158015611b6d5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611ba6576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015415611bfb5782604001516040517f5461848300000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b6040830151611c3e5782604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301511580611c5b57506020830151611c5b90600790612afe565b15611c92576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608301518051600003611cd457806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b81548290600490611cf290640100000000900463ffffffff16614898565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041660005b8251811015611dd057611d3b8382815181106115d9576115d96147e5565b611d7357826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b611dbf838281518110611d8857611d886147e5565b60200260200101518560030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b50611dc981614843565b9050611d1d565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff91821617845560408601516002850155602086015160018501819055611e269160079190612e9f16565b506040850151611e3890600990612e9f565b50845160408087015160208089015183519283529082015263ffffffff909216917f74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05910160405180910390a2505050505080611e9390614843565b90506119dc565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610612565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b828114611fda576040517fab8b67c60000000000000000000000000000000000000000000000000000000081526004810184905260248101829052604401610612565b6000805473ffffffffffffffffffffffffffffffffffffffff16905b848110156122d5576000868683818110612012576120126147e5565b90506020020160208101906120279190614230565b63ffffffff81166000908152600b6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff16612096576040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152602401610612565b60008686858181106120aa576120aa6147e5565b90506020028101906120bc919061490e565b6120c59061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16612116576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16331480159061215357503373ffffffffffffffffffffffffffffffffffffffff861614155b1561218c576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b8051825473ffffffffffffffffffffffffffffffffffffffff908116911614158061220857506020808201516040516121c59201613fdf565b60405160208183030381529060405280519060200120826001016040516020016121ef9190614d8f565b6040516020818303038152906040528051906020012014155b156122c157805182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602081015160018301906122629082614a04565b50806000015173ffffffffffffffffffffffffffffffffffffffff168363ffffffff167f86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a2883602001516040516122b89190613fdf565b60405180910390a35b505050806122ce90614843565b9050611ff6565b505050505050565b61230d6040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b60008281526002602052604090819020815160a08101909252805482908290612335906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612361906148bb565b80156123ae5780601f10612383576101008083540402835291602001916123ae565b820191906000526020600020905b81548152906001019060200180831161239157829003601f168201915b505050505081526020016001820180546123c7906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546123f3906148bb565b80156124405780601f1061241557610100808354040283529160200191612440565b820191906000526020600020905b81548152906001019060200180831161242357829003601f168201915b5050509183525050600282015460209091019060ff1660038111156124675761246761445b565b60038111156124785761247861445b565b81526020016002820160019054906101000a900460ff1660018111156124a0576124a061445b565b60018111156124b1576124b161445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b6124ea612b19565b63ffffffff8089166000908152600d602052604081205464010000000090049091169081900361254e576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a166004820152602401610612565b6125a0888888886040518060a001604052808f63ffffffff1681526020018761257690614898565b97508763ffffffff1681526020018a1515815260200189151581526020018860ff1681525061313f565b505050505050505050565b6125b3612b19565b600e805460009164010000000090910463ffffffff169060046125d583614898565b82546101009290920a63ffffffff81810219909316918316021790915581166000818152600d602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a08101835292835260019083015286151590820152841515606082015260ff8416608082015290915061266b90899089908990899061313f565b5050505050505050565b6060806126826003612e92565b915060006126906005612b9c565b835161269c9190614e38565b90508067ffffffffffffffff8111156126b7576126b7613d8e565b60405190808252806020026020018201604052801561271857816020015b6127056040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b8152602001906001900390816126d55790505b50915060008167ffffffffffffffff81111561273657612736613d8e565b60405190808252806020026020018201604052801561275f578160200160208202803683370190505b5090506000805b85518110156129ce576000868281518110612783576127836147e5565b602002602001015190506127a1816005612afe90919063ffffffff16565b6129bd5760008181526002602052604090819020815160a081019092528054829082906127cd906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546127f9906148bb565b80156128465780601f1061281b57610100808354040283529160200191612846565b820191906000526020600020905b81548152906001019060200180831161282957829003601f168201915b5050505050815260200160018201805461285f906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461288b906148bb565b80156128d85780601f106128ad576101008083540402835291602001916128d8565b820191906000526020600020905b8154815290600101906020018083116128bb57829003601f168201915b5050509183525050600282015460209091019060ff1660038111156128ff576128ff61445b565b60038111156129105761291061445b565b81526020016002820160019054906101000a900460ff1660018111156129385761293861445b565b60018111156129495761294961445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff166020909101528651879085908110612988576129886147e5565b6020026020010181905250808484815181106129a6576129a66147e5565b60209081029190910101526129ba83614843565b92505b506129c781614843565b9050612766565b5090949293505050565b606060006129e66009612e92565b90506000815167ffffffffffffffff811115612a0457612a04613d8e565b604051908082528060200260200182016040528015612a8b57816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181612a225790505b50905060005b825181101561080957612abc838281518110612aaf57612aaf6147e5565b6020026020010151611071565b828281518110612ace57612ace6147e5565b602002602001018190525080612ae390614843565b9050612a91565b612af2612b19565b612afb81613983565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610612565b565b6000610475825490565b6000612b128383613a78565b6000612b128383613aa2565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff8581168352600d8252848320805464010000000090049091168084526001909101825284832060028101805487518186028101860190985280885295969295919493909190830182828015612c6f57602002820191906000526020600020905b815481526020019060010190808311612c5b575b505050505090506000815167ffffffffffffffff811115612c9257612c92613d8e565b604051908082528060200260200182016040528015612cd857816020015b604080518082019091526000815260606020820152815260200190600190039081612cb05790505b50905060005b8151811015612df9576040518060400160405280848381518110612d0457612d046147e5565b60200260200101518152602001856003016000868581518110612d2957612d296147e5565b602002602001015181526020019081526020016000208054612d4a906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612d76906148bb565b8015612dc35780601f10612d9857610100808354040283529160200191612dc3565b820191906000526020600020905b815481529060010190602001808311612da657829003601f168201915b5050505050815250828281518110612ddd57612ddd6147e5565b602002602001018190525080612df290614843565b9050612cde565b506040805160e08101825263ffffffff8089166000818152600d6020818152868320548086168752948b168187015260ff680100000000000000008604811697870197909752690100000000000000000085048716151560608701529290915290526a010000000000000000000090049091161515608082015260a08101612e8085612e92565b81526020019190915295945050505050565b60606000612b1283613b95565b6000612b128383613bf1565b608081015173ffffffffffffffffffffffffffffffffffffffff1615612ff957608081015173ffffffffffffffffffffffffffffffffffffffff163b1580612fa4575060808101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f78bea72100000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff909116906301ffc9a790602401602060405180830381865afa158015612f7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa29190614e4b565b155b15612ff95760808101516040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610612565b6000828152600260205260409020815182919081906130189082614a04565b506020820151600182019061302d9082614a04565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600183600381111561306f5761306f61445b565b021790555060608201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360018111156130b6576130b661445b565b0217905550608091909101516002909101805473ffffffffffffffffffffffffffffffffffffffff90921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405182907f04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae90600090a25050565b805163ffffffff9081166000908152600d602090815260408083208286015190941683526001909301905220608082015160ff16158061319157506080820151859061318c906001614e68565b60ff16115b156131da5760808201516040517f25b4d61800000000000000000000000000000000000000000000000000000000815260ff909116600482015260248101869052604401610612565b6001826020015163ffffffff1611156132ca57815163ffffffff166000908152600d60209081526040822090840151600191820191839161321b919061487b565b63ffffffff1663ffffffff168152602001908152602001600020905060005b61324382612b9c565b8110156132c757613272846000015163ffffffff16600c60006105938587600001612ba690919063ffffffff16565b50600c60006132818484612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556132c081614843565b905061323a565b50505b60005b8581101561350c576132fa8787838181106132ea576132ea6147e5565b8592602090910201359050612e9f565b61335b578251878783818110613312576133126147e5565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8260600151156134b257825163ffffffff16600c6000898985818110613383576133836147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff16148015906133fd5750600c60008888848181106133ce576133ce6147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff1615155b1561345f578251878783818110613416576134166147e5565b6040517f60b9df7300000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8251600c6000898985818110613477576134776147e5565b90506020020135815260200190815260200160002060000160086101000a81548163ffffffff021916908363ffffffff1602179055506134fc565b82516134fa9063ffffffff16600c60008a8a868181106134d4576134d46147e5565b905060200201358152602001908152602001600020600401612e9f90919063ffffffff16565b505b61350581614843565b90506132cd565b5060005b838110156137f8573685858381811061352b5761352b6147e5565b905060200281019061353d919061490e565b905061354b60038235612afe565b613584576040517fe181733f00000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b61359060058235612afe565b156135ca576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b80356000908152600384016020526040812080546135e7906148bb565b905011156136335783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015281356024820152604401610612565b60005b87811015613745576136da8235600c60008c8c86818110613659576136596147e5565b9050602002013581526020019081526020016000206003016000600c60008e8e88818110613689576136896147e5565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020612afe90919063ffffffff16565b613735578888828181106136f0576136f06147e5565b6040517fa7e792500000000000000000000000000000000000000000000000000000000081526020909102929092013560048301525082356024820152604401610612565b61373e81614843565b9050613636565b506002830180546001810182556000918252602091829020833591015561376e90820182614e81565b8235600090815260038601602052604090209161378c919083614ee6565b5083516020808601516137e792918435908c908c906137ad90880188614e81565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613c4092505050565b506137f181614843565b9050613510565b50604080830151835163ffffffff9081166000908152600d602090815284822080549415156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff90951694909417909355606086015186518316825284822080549115156a0100000000000000000000027fffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffff9092169190911790556080860151865183168252848220805460ff9290921668010000000000000000027fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c158170365192613973929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613a02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610612565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110613a8f57613a8f6147e5565b9060005260206000200154905092915050565b60008181526001830160205260408120548015613b8b576000613ac6600183614e38565b8554909150600090613ada90600190614e38565b9050818114613b3f576000866000018281548110613afa57613afa6147e5565b9060005260206000200154905080876000018481548110613b1d57613b1d6147e5565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b5057613b50615001565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610475565b6000915050610475565b606081600001805480602002602001604051908101604052809291908181526020018280548015613be557602002820191906000526020600020905b815481526020019060010190808311613bd1575b50505050509050919050565b6000818152600183016020526040812054613c3857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610475565b506000610475565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff16156122d557600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c90613ce7908690869086908b908d90600401615030565b600060405180830381600087803b158015613d0157600080fd5b505af1158015613d15573d6000803e3d6000fd5b50505050505050505050565b508054613d2d906148bb565b6000825580601f10613d3d575050565b601f016020900490600052602060002090810190612afb9190613d75565b5080546000825590600052602060002090810190612afb91905b5b80821115613d8a5760008155600101613d76565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715613de057613de0613d8e565b60405290565b60405160a0810167ffffffffffffffff81118282101715613de057613de0613d8e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613e5057613e50613d8e565b604052919050565b600067ffffffffffffffff821115613e7257613e72613d8e565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613eaf57600080fd5b8135613ec2613ebd82613e58565b613e09565b818152846020838601011115613ed757600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613f0757600080fd5b823567ffffffffffffffff80821115613f1f57600080fd5b613f2b86838701613e9e565b93506020850135915080821115613f4157600080fd5b50613f4e85828601613e9e565b9150509250929050565b600060208284031215613f6a57600080fd5b5035919050565b60005b83811015613f8c578181015183820152602001613f74565b50506000910152565b60008151808452613fad816020860160208601613f71565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612b126020830184613f95565b60008083601f84011261400457600080fd5b50813567ffffffffffffffff81111561401c57600080fd5b6020830191508360208260051b850101111561106a57600080fd5b6000806020838503121561404a57600080fd5b823567ffffffffffffffff81111561406157600080fd5b61406d85828601613ff2565b90969095509350505050565b600081518084526020808501945080840160005b838110156140a95781518752958201959082019060010161408d565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b8581101561411057828403895281518051855285015160408686018190526140fc81870183613f95565b9a87019a95505050908401906001016140d2565b5091979650505050505050565b600063ffffffff8083511684528060208401511660208501525060ff604083015116604084015260608201511515606084015260808201511515608084015260a082015160e060a085015261417560e0850182614079565b905060c083015184820360c086015261418e82826140b4565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526141f885835161411d565b945092850192908501906001016141be565b5092979650505050505050565b803563ffffffff8116811461422b57600080fd5b919050565b60006020828403121561424257600080fd5b612b1282614217565b73ffffffffffffffffffffffffffffffffffffffff815116825260006020820151604060208501526142806040850182613f95565b949350505050565b602081526000612b12602083018461424b565b602081526000612b12602083018461411d565b600080604083850312156142c157600080fd5b6142ca83614217565b946020939093013593505050565b6040815260006142eb6040830185613f95565b828103602084015261418e8185613f95565b600063ffffffff80835116845280602084015116602085015280604084015116604085015250606082015160608401526080820151608084015260a082015160e060a085015261435060e0850182614079565b905060c083015184820360c086015261418e8282614079565b602081526000612b1260208301846142fd565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526143dd85835161424b565b945092850192908501906001016143a3565b6000806000806040858703121561440557600080fd5b843567ffffffffffffffff8082111561441d57600080fd5b61442988838901613ff2565b9096509450602087013591508082111561444257600080fd5b5061444f87828801613ff2565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160a0845261449f60a0850182613f95565b9050602083015184820360208601526144b88282613f95565b9150506040830151600481106144d0576144d061445b565b60408501526060830151600281106144ea576144ea61445b565b606085015260809283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b602081526000612b12602083018461448a565b8015158114612afb57600080fd5b803560ff8116811461422b57600080fd5b60008060008060008060008060c0898b03121561456557600080fd5b61456e89614217565b9750602089013567ffffffffffffffff8082111561458b57600080fd5b6145978c838d01613ff2565b909950975060408b01359150808211156145b057600080fd5b506145bd8b828c01613ff2565b90965094505060608901356145d18161452a565b925060808901356145e18161452a565b91506145ef60a08a01614538565b90509295985092959890939650565b600080600080600080600060a0888a03121561461957600080fd5b873567ffffffffffffffff8082111561463157600080fd5b61463d8b838c01613ff2565b909950975060208a013591508082111561465657600080fd5b506146638a828b01613ff2565b90965094505060408801356146778161452a565b925060608801356146878161452a565b915061469560808901614538565b905092959891949750929550565b6040815260006146b66040830185614079565b6020838203818501528185518084528284019150828160051b85010183880160005b83811015614724577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087840301855261471283835161448a565b948601949250908501906001016146d8565b50909998505050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526147948583516142fd565b9450928501929085019060010161475a565b803573ffffffffffffffffffffffffffffffffffffffff8116811461422b57600080fd5b6000602082840312156147dc57600080fd5b612b12826147a6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361487457614874614814565b5060010190565b63ffffffff82811682821603908082111561080957610809614814565b600063ffffffff8083168181036148b1576148b1614814565b6001019392505050565b600181811c908216806148cf57607f821691505b602082108103614908577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261494257600080fd5b9190910192915050565b60006040823603121561495e57600080fd5b6040516040810167ffffffffffffffff828210818311171561498257614982613d8e565b8160405261498f856147a6565b835260208501359150808211156149a557600080fd5b506149b236828601613e9e565b60208301525092915050565b601f8211156106a657600081815260208120601f850160051c810160208610156149e55750805b601f850160051c820191505b818110156122d5578281556001016149f1565b815167ffffffffffffffff811115614a1e57614a1e613d8e565b614a3281614a2c84546148bb565b846149be565b602080601f831160018114614a855760008415614a4f5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556122d5565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015614ad257888601518255948401946001909101908401614ab3565b5085821015614b0e57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614b3057600080fd5b815167ffffffffffffffff811115614b4757600080fd5b8201601f81018413614b5857600080fd5b8051614b66613ebd82613e58565b818152856020838501011115614b7b57600080fd5b61418e826020830160208601613f71565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261494257600080fd5b600060808236031215614bd257600080fd5b614bda613dbd565b614be383614217565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff80821115614c1457600080fd5b9085019036601f830112614c2757600080fd5b813581811115614c3957614c39613d8e565b8060051b9150614c4a848301613e09565b8181529183018401918481019036841115614c6457600080fd5b938501935b83851015614c8257843582529385019390850190614c69565b606087015250939695505050505050565b602081526000612b126020830184614079565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6183360301811261494257600080fd5b80356002811061422b57600080fd5b600060a08236031215614cfb57600080fd5b614d03613de6565b823567ffffffffffffffff80821115614d1b57600080fd5b614d2736838701613e9e565b83526020850135915080821115614d3d57600080fd5b50614d4a36828601613e9e565b602083015250604083013560048110614d6257600080fd5b6040820152614d7360608401614cda565b6060820152614d84608084016147a6565b608082015292915050565b6000602080835260008454614da3816148bb565b80848701526040600180841660008114614dc45760018114614dfc57614e2a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614e2a565b896000528660002060005b85811015614e225781548b8201860152908301908801614e07565b8a0184019650505b509398975050505050505050565b8181038181111561047557610475614814565b600060208284031215614e5d57600080fd5b8151612b128161452a565b60ff818116838216019081111561047557610475614814565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614eb657600080fd5b83018035915067ffffffffffffffff821115614ed157600080fd5b60200191503681900382131561106a57600080fd5b67ffffffffffffffff831115614efe57614efe613d8e565b614f1283614f0c83546148bb565b836149be565b6000601f841160018114614f645760008515614f2e5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614ffa565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614fb35786850135825560209485019460019092019101614f93565b5086821015614fee577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86111561506957600080fd5b8560051b808860a0850137820182810360a0908101602085015261508f90820187613f95565b91505063ffffffff8085166040840152808416606084015250969550505050505056fea164736f6c6343000813000a", } -var CapabilityRegistryABI = CapabilityRegistryMetaData.ABI +var CapabilitiesRegistryABI = CapabilitiesRegistryMetaData.ABI -var CapabilityRegistryBin = CapabilityRegistryMetaData.Bin +var CapabilitiesRegistryBin = CapabilitiesRegistryMetaData.Bin -func DeployCapabilityRegistry(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *CapabilityRegistry, error) { - parsed, err := CapabilityRegistryMetaData.GetAbi() +func DeployCapabilitiesRegistry(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *CapabilitiesRegistry, error) { + parsed, err := CapabilitiesRegistryMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err } @@ -93,134 +93,134 @@ func DeployCapabilityRegistry(auth *bind.TransactOpts, backend bind.ContractBack return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CapabilityRegistryBin), backend) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CapabilitiesRegistryBin), backend) if err != nil { return common.Address{}, nil, nil, err } - return address, tx, &CapabilityRegistry{address: address, abi: *parsed, CapabilityRegistryCaller: CapabilityRegistryCaller{contract: contract}, CapabilityRegistryTransactor: CapabilityRegistryTransactor{contract: contract}, CapabilityRegistryFilterer: CapabilityRegistryFilterer{contract: contract}}, nil + return address, tx, &CapabilitiesRegistry{address: address, abi: *parsed, CapabilitiesRegistryCaller: CapabilitiesRegistryCaller{contract: contract}, CapabilitiesRegistryTransactor: CapabilitiesRegistryTransactor{contract: contract}, CapabilitiesRegistryFilterer: CapabilitiesRegistryFilterer{contract: contract}}, nil } -type CapabilityRegistry struct { +type CapabilitiesRegistry struct { address common.Address abi abi.ABI - CapabilityRegistryCaller - CapabilityRegistryTransactor - CapabilityRegistryFilterer + CapabilitiesRegistryCaller + CapabilitiesRegistryTransactor + CapabilitiesRegistryFilterer } -type CapabilityRegistryCaller struct { +type CapabilitiesRegistryCaller struct { contract *bind.BoundContract } -type CapabilityRegistryTransactor struct { +type CapabilitiesRegistryTransactor struct { contract *bind.BoundContract } -type CapabilityRegistryFilterer struct { +type CapabilitiesRegistryFilterer struct { contract *bind.BoundContract } -type CapabilityRegistrySession struct { - Contract *CapabilityRegistry +type CapabilitiesRegistrySession struct { + Contract *CapabilitiesRegistry CallOpts bind.CallOpts TransactOpts bind.TransactOpts } -type CapabilityRegistryCallerSession struct { - Contract *CapabilityRegistryCaller +type CapabilitiesRegistryCallerSession struct { + Contract *CapabilitiesRegistryCaller CallOpts bind.CallOpts } -type CapabilityRegistryTransactorSession struct { - Contract *CapabilityRegistryTransactor +type CapabilitiesRegistryTransactorSession struct { + Contract *CapabilitiesRegistryTransactor TransactOpts bind.TransactOpts } -type CapabilityRegistryRaw struct { - Contract *CapabilityRegistry +type CapabilitiesRegistryRaw struct { + Contract *CapabilitiesRegistry } -type CapabilityRegistryCallerRaw struct { - Contract *CapabilityRegistryCaller +type CapabilitiesRegistryCallerRaw struct { + Contract *CapabilitiesRegistryCaller } -type CapabilityRegistryTransactorRaw struct { - Contract *CapabilityRegistryTransactor +type CapabilitiesRegistryTransactorRaw struct { + Contract *CapabilitiesRegistryTransactor } -func NewCapabilityRegistry(address common.Address, backend bind.ContractBackend) (*CapabilityRegistry, error) { - abi, err := abi.JSON(strings.NewReader(CapabilityRegistryABI)) +func NewCapabilitiesRegistry(address common.Address, backend bind.ContractBackend) (*CapabilitiesRegistry, error) { + abi, err := abi.JSON(strings.NewReader(CapabilitiesRegistryABI)) if err != nil { return nil, err } - contract, err := bindCapabilityRegistry(address, backend, backend, backend) + contract, err := bindCapabilitiesRegistry(address, backend, backend, backend) if err != nil { return nil, err } - return &CapabilityRegistry{address: address, abi: abi, CapabilityRegistryCaller: CapabilityRegistryCaller{contract: contract}, CapabilityRegistryTransactor: CapabilityRegistryTransactor{contract: contract}, CapabilityRegistryFilterer: CapabilityRegistryFilterer{contract: contract}}, nil + return &CapabilitiesRegistry{address: address, abi: abi, CapabilitiesRegistryCaller: CapabilitiesRegistryCaller{contract: contract}, CapabilitiesRegistryTransactor: CapabilitiesRegistryTransactor{contract: contract}, CapabilitiesRegistryFilterer: CapabilitiesRegistryFilterer{contract: contract}}, nil } -func NewCapabilityRegistryCaller(address common.Address, caller bind.ContractCaller) (*CapabilityRegistryCaller, error) { - contract, err := bindCapabilityRegistry(address, caller, nil, nil) +func NewCapabilitiesRegistryCaller(address common.Address, caller bind.ContractCaller) (*CapabilitiesRegistryCaller, error) { + contract, err := bindCapabilitiesRegistry(address, caller, nil, nil) if err != nil { return nil, err } - return &CapabilityRegistryCaller{contract: contract}, nil + return &CapabilitiesRegistryCaller{contract: contract}, nil } -func NewCapabilityRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*CapabilityRegistryTransactor, error) { - contract, err := bindCapabilityRegistry(address, nil, transactor, nil) +func NewCapabilitiesRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*CapabilitiesRegistryTransactor, error) { + contract, err := bindCapabilitiesRegistry(address, nil, transactor, nil) if err != nil { return nil, err } - return &CapabilityRegistryTransactor{contract: contract}, nil + return &CapabilitiesRegistryTransactor{contract: contract}, nil } -func NewCapabilityRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*CapabilityRegistryFilterer, error) { - contract, err := bindCapabilityRegistry(address, nil, nil, filterer) +func NewCapabilitiesRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*CapabilitiesRegistryFilterer, error) { + contract, err := bindCapabilitiesRegistry(address, nil, nil, filterer) if err != nil { return nil, err } - return &CapabilityRegistryFilterer{contract: contract}, nil + return &CapabilitiesRegistryFilterer{contract: contract}, nil } -func bindCapabilityRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := CapabilityRegistryMetaData.GetAbi() +func bindCapabilitiesRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CapabilitiesRegistryMetaData.GetAbi() if err != nil { return nil, err } return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } -func (_CapabilityRegistry *CapabilityRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _CapabilityRegistry.Contract.CapabilityRegistryCaller.contract.Call(opts, result, method, params...) +func (_CapabilitiesRegistry *CapabilitiesRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CapabilitiesRegistry.Contract.CapabilitiesRegistryCaller.contract.Call(opts, result, method, params...) } -func (_CapabilityRegistry *CapabilityRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.CapabilityRegistryTransactor.contract.Transfer(opts) +func (_CapabilitiesRegistry *CapabilitiesRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.CapabilitiesRegistryTransactor.contract.Transfer(opts) } -func (_CapabilityRegistry *CapabilityRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.CapabilityRegistryTransactor.contract.Transact(opts, method, params...) +func (_CapabilitiesRegistry *CapabilitiesRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.CapabilitiesRegistryTransactor.contract.Transact(opts, method, params...) } -func (_CapabilityRegistry *CapabilityRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _CapabilityRegistry.Contract.contract.Call(opts, result, method, params...) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CapabilitiesRegistry.Contract.contract.Call(opts, result, method, params...) } -func (_CapabilityRegistry *CapabilityRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.contract.Transfer(opts) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.contract.Transfer(opts) } -func (_CapabilityRegistry *CapabilityRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.contract.Transact(opts, method, params...) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.contract.Transact(opts, method, params...) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetCapabilities(opts *bind.CallOpts) (GetCapabilities, +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetCapabilities(opts *bind.CallOpts) (GetCapabilities, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getCapabilities") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getCapabilities") outstruct := new(GetCapabilities) if err != nil { @@ -228,49 +228,49 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) GetCapabilities(opts *bind. } outstruct.HashedCapabilityIds = *abi.ConvertType(out[0], new([][32]byte)).(*[][32]byte) - outstruct.Capabilities = *abi.ConvertType(out[1], new([]CapabilityRegistryCapability)).(*[]CapabilityRegistryCapability) + outstruct.Capabilities = *abi.ConvertType(out[1], new([]CapabilitiesRegistryCapability)).(*[]CapabilitiesRegistryCapability) return *outstruct, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetCapabilities() (GetCapabilities, +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetCapabilities() (GetCapabilities, error) { - return _CapabilityRegistry.Contract.GetCapabilities(&_CapabilityRegistry.CallOpts) + return _CapabilitiesRegistry.Contract.GetCapabilities(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetCapabilities() (GetCapabilities, +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetCapabilities() (GetCapabilities, error) { - return _CapabilityRegistry.Contract.GetCapabilities(&_CapabilityRegistry.CallOpts) + return _CapabilitiesRegistry.Contract.GetCapabilities(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilityRegistryCapability, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilitiesRegistryCapability, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getCapability", hashedId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getCapability", hashedId) if err != nil { - return *new(CapabilityRegistryCapability), err + return *new(CapabilitiesRegistryCapability), err } - out0 := *abi.ConvertType(out[0], new(CapabilityRegistryCapability)).(*CapabilityRegistryCapability) + out0 := *abi.ConvertType(out[0], new(CapabilitiesRegistryCapability)).(*CapabilitiesRegistryCapability) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetCapability(hashedId [32]byte) (CapabilityRegistryCapability, error) { - return _CapabilityRegistry.Contract.GetCapability(&_CapabilityRegistry.CallOpts, hashedId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetCapability(hashedId [32]byte) (CapabilitiesRegistryCapability, error) { + return _CapabilitiesRegistry.Contract.GetCapability(&_CapabilitiesRegistry.CallOpts, hashedId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetCapability(hashedId [32]byte) (CapabilityRegistryCapability, error) { - return _CapabilityRegistry.Contract.GetCapability(&_CapabilityRegistry.CallOpts, hashedId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetCapability(hashedId [32]byte) (CapabilitiesRegistryCapability, error) { + return _CapabilitiesRegistry.Contract.GetCapability(&_CapabilitiesRegistry.CallOpts, hashedId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetCapabilityConfigs(opts *bind.CallOpts, donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetCapabilityConfigs(opts *bind.CallOpts, donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getCapabilityConfigs", donId, capabilityId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getCapabilityConfigs", donId, capabilityId) if err != nil { return *new([]byte), *new([]byte), err @@ -283,61 +283,61 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) GetCapabilityConfigs(opts * } -func (_CapabilityRegistry *CapabilityRegistrySession) GetCapabilityConfigs(donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { - return _CapabilityRegistry.Contract.GetCapabilityConfigs(&_CapabilityRegistry.CallOpts, donId, capabilityId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetCapabilityConfigs(donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { + return _CapabilitiesRegistry.Contract.GetCapabilityConfigs(&_CapabilitiesRegistry.CallOpts, donId, capabilityId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetCapabilityConfigs(donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { - return _CapabilityRegistry.Contract.GetCapabilityConfigs(&_CapabilityRegistry.CallOpts, donId, capabilityId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetCapabilityConfigs(donId uint32, capabilityId [32]byte) ([]byte, []byte, error) { + return _CapabilitiesRegistry.Contract.GetCapabilityConfigs(&_CapabilitiesRegistry.CallOpts, donId, capabilityId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetDON(opts *bind.CallOpts, donId uint32) (CapabilityRegistryDONInfo, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetDON(opts *bind.CallOpts, donId uint32) (CapabilitiesRegistryDONInfo, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getDON", donId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getDON", donId) if err != nil { - return *new(CapabilityRegistryDONInfo), err + return *new(CapabilitiesRegistryDONInfo), err } - out0 := *abi.ConvertType(out[0], new(CapabilityRegistryDONInfo)).(*CapabilityRegistryDONInfo) + out0 := *abi.ConvertType(out[0], new(CapabilitiesRegistryDONInfo)).(*CapabilitiesRegistryDONInfo) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetDON(donId uint32) (CapabilityRegistryDONInfo, error) { - return _CapabilityRegistry.Contract.GetDON(&_CapabilityRegistry.CallOpts, donId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetDON(donId uint32) (CapabilitiesRegistryDONInfo, error) { + return _CapabilitiesRegistry.Contract.GetDON(&_CapabilitiesRegistry.CallOpts, donId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetDON(donId uint32) (CapabilityRegistryDONInfo, error) { - return _CapabilityRegistry.Contract.GetDON(&_CapabilityRegistry.CallOpts, donId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetDON(donId uint32) (CapabilitiesRegistryDONInfo, error) { + return _CapabilitiesRegistry.Contract.GetDON(&_CapabilitiesRegistry.CallOpts, donId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetDONs(opts *bind.CallOpts) ([]CapabilityRegistryDONInfo, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetDONs(opts *bind.CallOpts) ([]CapabilitiesRegistryDONInfo, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getDONs") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getDONs") if err != nil { - return *new([]CapabilityRegistryDONInfo), err + return *new([]CapabilitiesRegistryDONInfo), err } - out0 := *abi.ConvertType(out[0], new([]CapabilityRegistryDONInfo)).(*[]CapabilityRegistryDONInfo) + out0 := *abi.ConvertType(out[0], new([]CapabilitiesRegistryDONInfo)).(*[]CapabilitiesRegistryDONInfo) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetDONs() ([]CapabilityRegistryDONInfo, error) { - return _CapabilityRegistry.Contract.GetDONs(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetDONs() ([]CapabilitiesRegistryDONInfo, error) { + return _CapabilitiesRegistry.Contract.GetDONs(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetDONs() ([]CapabilityRegistryDONInfo, error) { - return _CapabilityRegistry.Contract.GetDONs(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetDONs() ([]CapabilitiesRegistryDONInfo, error) { + return _CapabilitiesRegistry.Contract.GetDONs(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetHashedCapabilityId(opts *bind.CallOpts, labelledName string, version string) ([32]byte, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetHashedCapabilityId(opts *bind.CallOpts, labelledName string, version string) ([32]byte, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getHashedCapabilityId", labelledName, version) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getHashedCapabilityId", labelledName, version) if err != nil { return *new([32]byte), err @@ -349,105 +349,105 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) GetHashedCapabilityId(opts } -func (_CapabilityRegistry *CapabilityRegistrySession) GetHashedCapabilityId(labelledName string, version string) ([32]byte, error) { - return _CapabilityRegistry.Contract.GetHashedCapabilityId(&_CapabilityRegistry.CallOpts, labelledName, version) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetHashedCapabilityId(labelledName string, version string) ([32]byte, error) { + return _CapabilitiesRegistry.Contract.GetHashedCapabilityId(&_CapabilitiesRegistry.CallOpts, labelledName, version) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetHashedCapabilityId(labelledName string, version string) ([32]byte, error) { - return _CapabilityRegistry.Contract.GetHashedCapabilityId(&_CapabilityRegistry.CallOpts, labelledName, version) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetHashedCapabilityId(labelledName string, version string) ([32]byte, error) { + return _CapabilitiesRegistry.Contract.GetHashedCapabilityId(&_CapabilitiesRegistry.CallOpts, labelledName, version) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilityRegistryNodeInfo, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilitiesRegistryNodeInfo, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getNode", p2pId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getNode", p2pId) if err != nil { - return *new(CapabilityRegistryNodeInfo), err + return *new(CapabilitiesRegistryNodeInfo), err } - out0 := *abi.ConvertType(out[0], new(CapabilityRegistryNodeInfo)).(*CapabilityRegistryNodeInfo) + out0 := *abi.ConvertType(out[0], new(CapabilitiesRegistryNodeInfo)).(*CapabilitiesRegistryNodeInfo) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetNode(p2pId [32]byte) (CapabilityRegistryNodeInfo, error) { - return _CapabilityRegistry.Contract.GetNode(&_CapabilityRegistry.CallOpts, p2pId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetNode(p2pId [32]byte) (CapabilitiesRegistryNodeInfo, error) { + return _CapabilitiesRegistry.Contract.GetNode(&_CapabilitiesRegistry.CallOpts, p2pId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNode(p2pId [32]byte) (CapabilityRegistryNodeInfo, error) { - return _CapabilityRegistry.Contract.GetNode(&_CapabilityRegistry.CallOpts, p2pId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetNode(p2pId [32]byte) (CapabilitiesRegistryNodeInfo, error) { + return _CapabilitiesRegistry.Contract.GetNode(&_CapabilitiesRegistry.CallOpts, p2pId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetNodeOperator(opts *bind.CallOpts, nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetNodeOperator(opts *bind.CallOpts, nodeOperatorId uint32) (CapabilitiesRegistryNodeOperator, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getNodeOperator", nodeOperatorId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getNodeOperator", nodeOperatorId) if err != nil { - return *new(CapabilityRegistryNodeOperator), err + return *new(CapabilitiesRegistryNodeOperator), err } - out0 := *abi.ConvertType(out[0], new(CapabilityRegistryNodeOperator)).(*CapabilityRegistryNodeOperator) + out0 := *abi.ConvertType(out[0], new(CapabilitiesRegistryNodeOperator)).(*CapabilitiesRegistryNodeOperator) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetNodeOperator(nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) { - return _CapabilityRegistry.Contract.GetNodeOperator(&_CapabilityRegistry.CallOpts, nodeOperatorId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetNodeOperator(nodeOperatorId uint32) (CapabilitiesRegistryNodeOperator, error) { + return _CapabilitiesRegistry.Contract.GetNodeOperator(&_CapabilitiesRegistry.CallOpts, nodeOperatorId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNodeOperator(nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) { - return _CapabilityRegistry.Contract.GetNodeOperator(&_CapabilityRegistry.CallOpts, nodeOperatorId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetNodeOperator(nodeOperatorId uint32) (CapabilitiesRegistryNodeOperator, error) { + return _CapabilitiesRegistry.Contract.GetNodeOperator(&_CapabilitiesRegistry.CallOpts, nodeOperatorId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetNodeOperators(opts *bind.CallOpts) ([]CapabilityRegistryNodeOperator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetNodeOperators(opts *bind.CallOpts) ([]CapabilitiesRegistryNodeOperator, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getNodeOperators") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getNodeOperators") if err != nil { - return *new([]CapabilityRegistryNodeOperator), err + return *new([]CapabilitiesRegistryNodeOperator), err } - out0 := *abi.ConvertType(out[0], new([]CapabilityRegistryNodeOperator)).(*[]CapabilityRegistryNodeOperator) + out0 := *abi.ConvertType(out[0], new([]CapabilitiesRegistryNodeOperator)).(*[]CapabilitiesRegistryNodeOperator) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetNodeOperators() ([]CapabilityRegistryNodeOperator, error) { - return _CapabilityRegistry.Contract.GetNodeOperators(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetNodeOperators() ([]CapabilitiesRegistryNodeOperator, error) { + return _CapabilitiesRegistry.Contract.GetNodeOperators(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNodeOperators() ([]CapabilityRegistryNodeOperator, error) { - return _CapabilityRegistry.Contract.GetNodeOperators(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetNodeOperators() ([]CapabilitiesRegistryNodeOperator, error) { + return _CapabilitiesRegistry.Contract.GetNodeOperators(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) GetNodes(opts *bind.CallOpts) ([]CapabilityRegistryNodeInfo, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetNodes(opts *bind.CallOpts) ([]CapabilitiesRegistryNodeInfo, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "getNodes") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "getNodes") if err != nil { - return *new([]CapabilityRegistryNodeInfo), err + return *new([]CapabilitiesRegistryNodeInfo), err } - out0 := *abi.ConvertType(out[0], new([]CapabilityRegistryNodeInfo)).(*[]CapabilityRegistryNodeInfo) + out0 := *abi.ConvertType(out[0], new([]CapabilitiesRegistryNodeInfo)).(*[]CapabilitiesRegistryNodeInfo) return out0, err } -func (_CapabilityRegistry *CapabilityRegistrySession) GetNodes() ([]CapabilityRegistryNodeInfo, error) { - return _CapabilityRegistry.Contract.GetNodes(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetNodes() ([]CapabilitiesRegistryNodeInfo, error) { + return _CapabilitiesRegistry.Contract.GetNodes(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) GetNodes() ([]CapabilityRegistryNodeInfo, error) { - return _CapabilityRegistry.Contract.GetNodes(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetNodes() ([]CapabilitiesRegistryNodeInfo, error) { + return _CapabilitiesRegistry.Contract.GetNodes(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) IsCapabilityDeprecated(opts *bind.CallOpts, hashedCapabilityId [32]byte) (bool, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) IsCapabilityDeprecated(opts *bind.CallOpts, hashedCapabilityId [32]byte) (bool, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "isCapabilityDeprecated", hashedCapabilityId) + err := _CapabilitiesRegistry.contract.Call(opts, &out, "isCapabilityDeprecated", hashedCapabilityId) if err != nil { return *new(bool), err @@ -459,17 +459,17 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) IsCapabilityDeprecated(opts } -func (_CapabilityRegistry *CapabilityRegistrySession) IsCapabilityDeprecated(hashedCapabilityId [32]byte) (bool, error) { - return _CapabilityRegistry.Contract.IsCapabilityDeprecated(&_CapabilityRegistry.CallOpts, hashedCapabilityId) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) IsCapabilityDeprecated(hashedCapabilityId [32]byte) (bool, error) { + return _CapabilitiesRegistry.Contract.IsCapabilityDeprecated(&_CapabilitiesRegistry.CallOpts, hashedCapabilityId) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) IsCapabilityDeprecated(hashedCapabilityId [32]byte) (bool, error) { - return _CapabilityRegistry.Contract.IsCapabilityDeprecated(&_CapabilityRegistry.CallOpts, hashedCapabilityId) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) IsCapabilityDeprecated(hashedCapabilityId [32]byte) (bool, error) { + return _CapabilitiesRegistry.Contract.IsCapabilityDeprecated(&_CapabilitiesRegistry.CallOpts, hashedCapabilityId) } -func (_CapabilityRegistry *CapabilityRegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "owner") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "owner") if err != nil { return *new(common.Address), err @@ -481,17 +481,17 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) Owner(opts *bind.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistrySession) Owner() (common.Address, error) { - return _CapabilityRegistry.Contract.Owner(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) Owner() (common.Address, error) { + return _CapabilitiesRegistry.Contract.Owner(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) Owner() (common.Address, error) { - return _CapabilityRegistry.Contract.Owner(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) Owner() (common.Address, error) { + return _CapabilitiesRegistry.Contract.Owner(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { var out []interface{} - err := _CapabilityRegistry.contract.Call(opts, &out, "typeAndVersion") + err := _CapabilitiesRegistry.contract.Call(opts, &out, "typeAndVersion") if err != nil { return *new(string), err @@ -503,172 +503,172 @@ func (_CapabilityRegistry *CapabilityRegistryCaller) TypeAndVersion(opts *bind.C } -func (_CapabilityRegistry *CapabilityRegistrySession) TypeAndVersion() (string, error) { - return _CapabilityRegistry.Contract.TypeAndVersion(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) TypeAndVersion() (string, error) { + return _CapabilitiesRegistry.Contract.TypeAndVersion(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryCallerSession) TypeAndVersion() (string, error) { - return _CapabilityRegistry.Contract.TypeAndVersion(&_CapabilityRegistry.CallOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) TypeAndVersion() (string, error) { + return _CapabilitiesRegistry.Contract.TypeAndVersion(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "acceptOwnership") +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "acceptOwnership") } -func (_CapabilityRegistry *CapabilityRegistrySession) AcceptOwnership() (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AcceptOwnership(&_CapabilityRegistry.TransactOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) AcceptOwnership() (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AcceptOwnership(&_CapabilitiesRegistry.TransactOpts) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AcceptOwnership(&_CapabilityRegistry.TransactOpts) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AcceptOwnership(&_CapabilitiesRegistry.TransactOpts) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AddCapabilities(opts *bind.TransactOpts, capabilities []CapabilityRegistryCapability) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "addCapabilities", capabilities) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) AddCapabilities(opts *bind.TransactOpts, capabilities []CapabilitiesRegistryCapability) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "addCapabilities", capabilities) } -func (_CapabilityRegistry *CapabilityRegistrySession) AddCapabilities(capabilities []CapabilityRegistryCapability) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddCapabilities(&_CapabilityRegistry.TransactOpts, capabilities) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) AddCapabilities(capabilities []CapabilitiesRegistryCapability) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddCapabilities(&_CapabilitiesRegistry.TransactOpts, capabilities) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddCapabilities(capabilities []CapabilityRegistryCapability) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddCapabilities(&_CapabilityRegistry.TransactOpts, capabilities) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) AddCapabilities(capabilities []CapabilitiesRegistryCapability) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddCapabilities(&_CapabilitiesRegistry.TransactOpts, capabilities) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "addDON", nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "addDON", nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistrySession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddDON(&_CapabilityRegistry.TransactOpts, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddDON(&_CapabilitiesRegistry.TransactOpts, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddDON(&_CapabilityRegistry.TransactOpts, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) AddDON(nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddDON(&_CapabilitiesRegistry.TransactOpts, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AddNodeOperators(opts *bind.TransactOpts, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "addNodeOperators", nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) AddNodeOperators(opts *bind.TransactOpts, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "addNodeOperators", nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistrySession) AddNodeOperators(nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) AddNodeOperators(nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddNodeOperators(nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) AddNodeOperators(nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) AddNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "addNodes", nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) AddNodes(opts *bind.TransactOpts, nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "addNodes", nodes) } -func (_CapabilityRegistry *CapabilityRegistrySession) AddNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddNodes(&_CapabilityRegistry.TransactOpts, nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) AddNodes(nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddNodes(&_CapabilitiesRegistry.TransactOpts, nodes) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) AddNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.AddNodes(&_CapabilityRegistry.TransactOpts, nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) AddNodes(nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.AddNodes(&_CapabilitiesRegistry.TransactOpts, nodes) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) DeprecateCapabilities(opts *bind.TransactOpts, hashedCapabilityIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "deprecateCapabilities", hashedCapabilityIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) DeprecateCapabilities(opts *bind.TransactOpts, hashedCapabilityIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "deprecateCapabilities", hashedCapabilityIds) } -func (_CapabilityRegistry *CapabilityRegistrySession) DeprecateCapabilities(hashedCapabilityIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.DeprecateCapabilities(&_CapabilityRegistry.TransactOpts, hashedCapabilityIds) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) DeprecateCapabilities(hashedCapabilityIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.DeprecateCapabilities(&_CapabilitiesRegistry.TransactOpts, hashedCapabilityIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) DeprecateCapabilities(hashedCapabilityIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.DeprecateCapabilities(&_CapabilityRegistry.TransactOpts, hashedCapabilityIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) DeprecateCapabilities(hashedCapabilityIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.DeprecateCapabilities(&_CapabilitiesRegistry.TransactOpts, hashedCapabilityIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) RemoveDONs(opts *bind.TransactOpts, donIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "removeDONs", donIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) RemoveDONs(opts *bind.TransactOpts, donIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "removeDONs", donIds) } -func (_CapabilityRegistry *CapabilityRegistrySession) RemoveDONs(donIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveDONs(&_CapabilityRegistry.TransactOpts, donIds) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) RemoveDONs(donIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveDONs(&_CapabilitiesRegistry.TransactOpts, donIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) RemoveDONs(donIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveDONs(&_CapabilityRegistry.TransactOpts, donIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) RemoveDONs(donIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveDONs(&_CapabilitiesRegistry.TransactOpts, donIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) RemoveNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "removeNodeOperators", nodeOperatorIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) RemoveNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "removeNodeOperators", nodeOperatorIds) } -func (_CapabilityRegistry *CapabilityRegistrySession) RemoveNodeOperators(nodeOperatorIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) RemoveNodeOperators(nodeOperatorIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperatorIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) RemoveNodeOperators(nodeOperatorIds []uint32) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) RemoveNodeOperators(nodeOperatorIds []uint32) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperatorIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) RemoveNodes(opts *bind.TransactOpts, removedNodeP2PIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "removeNodes", removedNodeP2PIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) RemoveNodes(opts *bind.TransactOpts, removedNodeP2PIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "removeNodes", removedNodeP2PIds) } -func (_CapabilityRegistry *CapabilityRegistrySession) RemoveNodes(removedNodeP2PIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveNodes(&_CapabilityRegistry.TransactOpts, removedNodeP2PIds) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) RemoveNodes(removedNodeP2PIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveNodes(&_CapabilitiesRegistry.TransactOpts, removedNodeP2PIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) RemoveNodes(removedNodeP2PIds [][32]byte) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.RemoveNodes(&_CapabilityRegistry.TransactOpts, removedNodeP2PIds) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) RemoveNodes(removedNodeP2PIds [][32]byte) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.RemoveNodes(&_CapabilitiesRegistry.TransactOpts, removedNodeP2PIds) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "transferOwnership", to) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "transferOwnership", to) } -func (_CapabilityRegistry *CapabilityRegistrySession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.TransferOwnership(&_CapabilityRegistry.TransactOpts, to) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.TransferOwnership(&_CapabilitiesRegistry.TransactOpts, to) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.TransferOwnership(&_CapabilityRegistry.TransactOpts, to) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.TransferOwnership(&_CapabilitiesRegistry.TransactOpts, to) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "updateDON", donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "updateDON", donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistrySession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateDON(&_CapabilityRegistry.TransactOpts, donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateDON(&_CapabilitiesRegistry.TransactOpts, donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateDON(&_CapabilityRegistry.TransactOpts, donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) UpdateDON(donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateDON(&_CapabilitiesRegistry.TransactOpts, donId, nodes, capabilityConfigurations, isPublic, acceptsWorkflows, f) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "updateNodeOperators", nodeOperatorIds, nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "updateNodeOperators", nodeOperatorIds, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistrySession) UpdateNodeOperators(nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds, nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) UpdateNodeOperators(nodeOperatorIds []uint32, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperatorIds, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateNodeOperators(nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateNodeOperators(&_CapabilityRegistry.TransactOpts, nodeOperatorIds, nodeOperators) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) UpdateNodeOperators(nodeOperatorIds []uint32, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateNodeOperators(&_CapabilitiesRegistry.TransactOpts, nodeOperatorIds, nodeOperators) } -func (_CapabilityRegistry *CapabilityRegistryTransactor) UpdateNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.contract.Transact(opts, "updateNodes", nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactor) UpdateNodes(opts *bind.TransactOpts, nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.contract.Transact(opts, "updateNodes", nodes) } -func (_CapabilityRegistry *CapabilityRegistrySession) UpdateNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateNodes(&_CapabilityRegistry.TransactOpts, nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) UpdateNodes(nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateNodes(&_CapabilitiesRegistry.TransactOpts, nodes) } -func (_CapabilityRegistry *CapabilityRegistryTransactorSession) UpdateNodes(nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) { - return _CapabilityRegistry.Contract.UpdateNodes(&_CapabilityRegistry.TransactOpts, nodes) +func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorSession) UpdateNodes(nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) { + return _CapabilitiesRegistry.Contract.UpdateNodes(&_CapabilitiesRegistry.TransactOpts, nodes) } -type CapabilityRegistryCapabilityConfiguredIterator struct { - Event *CapabilityRegistryCapabilityConfigured +type CapabilitiesRegistryCapabilityConfiguredIterator struct { + Event *CapabilitiesRegistryCapabilityConfigured contract *bind.BoundContract event string @@ -679,7 +679,7 @@ type CapabilityRegistryCapabilityConfiguredIterator struct { fail error } -func (it *CapabilityRegistryCapabilityConfiguredIterator) Next() bool { +func (it *CapabilitiesRegistryCapabilityConfiguredIterator) Next() bool { if it.fail != nil { return false @@ -688,7 +688,7 @@ func (it *CapabilityRegistryCapabilityConfiguredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryCapabilityConfigured) + it.Event = new(CapabilitiesRegistryCapabilityConfigured) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -703,7 +703,7 @@ func (it *CapabilityRegistryCapabilityConfiguredIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryCapabilityConfigured) + it.Event = new(CapabilitiesRegistryCapabilityConfigured) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -718,42 +718,42 @@ func (it *CapabilityRegistryCapabilityConfiguredIterator) Next() bool { } } -func (it *CapabilityRegistryCapabilityConfiguredIterator) Error() error { +func (it *CapabilitiesRegistryCapabilityConfiguredIterator) Error() error { return it.fail } -func (it *CapabilityRegistryCapabilityConfiguredIterator) Close() error { +func (it *CapabilitiesRegistryCapabilityConfiguredIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryCapabilityConfigured struct { +type CapabilitiesRegistryCapabilityConfigured struct { HashedCapabilityId [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterCapabilityConfigured(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityConfiguredIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterCapabilityConfigured(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilitiesRegistryCapabilityConfiguredIterator, error) { var hashedCapabilityIdRule []interface{} for _, hashedCapabilityIdItem := range hashedCapabilityId { hashedCapabilityIdRule = append(hashedCapabilityIdRule, hashedCapabilityIdItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "CapabilityConfigured", hashedCapabilityIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "CapabilityConfigured", hashedCapabilityIdRule) if err != nil { return nil, err } - return &CapabilityRegistryCapabilityConfiguredIterator{contract: _CapabilityRegistry.contract, event: "CapabilityConfigured", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryCapabilityConfiguredIterator{contract: _CapabilitiesRegistry.contract, event: "CapabilityConfigured", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityConfigured(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityConfigured, hashedCapabilityId [][32]byte) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchCapabilityConfigured(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryCapabilityConfigured, hashedCapabilityId [][32]byte) (event.Subscription, error) { var hashedCapabilityIdRule []interface{} for _, hashedCapabilityIdItem := range hashedCapabilityId { hashedCapabilityIdRule = append(hashedCapabilityIdRule, hashedCapabilityIdItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "CapabilityConfigured", hashedCapabilityIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "CapabilityConfigured", hashedCapabilityIdRule) if err != nil { return nil, err } @@ -763,8 +763,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityConfigured select { case log := <-logs: - event := new(CapabilityRegistryCapabilityConfigured) - if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityConfigured", log); err != nil { + event := new(CapabilitiesRegistryCapabilityConfigured) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "CapabilityConfigured", log); err != nil { return err } event.Raw = log @@ -785,17 +785,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityConfigured }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseCapabilityConfigured(log types.Log) (*CapabilityRegistryCapabilityConfigured, error) { - event := new(CapabilityRegistryCapabilityConfigured) - if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityConfigured", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseCapabilityConfigured(log types.Log) (*CapabilitiesRegistryCapabilityConfigured, error) { + event := new(CapabilitiesRegistryCapabilityConfigured) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "CapabilityConfigured", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryCapabilityDeprecatedIterator struct { - Event *CapabilityRegistryCapabilityDeprecated +type CapabilitiesRegistryCapabilityDeprecatedIterator struct { + Event *CapabilitiesRegistryCapabilityDeprecated contract *bind.BoundContract event string @@ -806,7 +806,7 @@ type CapabilityRegistryCapabilityDeprecatedIterator struct { fail error } -func (it *CapabilityRegistryCapabilityDeprecatedIterator) Next() bool { +func (it *CapabilitiesRegistryCapabilityDeprecatedIterator) Next() bool { if it.fail != nil { return false @@ -815,7 +815,7 @@ func (it *CapabilityRegistryCapabilityDeprecatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryCapabilityDeprecated) + it.Event = new(CapabilitiesRegistryCapabilityDeprecated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -830,7 +830,7 @@ func (it *CapabilityRegistryCapabilityDeprecatedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryCapabilityDeprecated) + it.Event = new(CapabilitiesRegistryCapabilityDeprecated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -845,42 +845,42 @@ func (it *CapabilityRegistryCapabilityDeprecatedIterator) Next() bool { } } -func (it *CapabilityRegistryCapabilityDeprecatedIterator) Error() error { +func (it *CapabilitiesRegistryCapabilityDeprecatedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryCapabilityDeprecatedIterator) Close() error { +func (it *CapabilitiesRegistryCapabilityDeprecatedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryCapabilityDeprecated struct { +type CapabilitiesRegistryCapabilityDeprecated struct { HashedCapabilityId [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterCapabilityDeprecated(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityDeprecatedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterCapabilityDeprecated(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilitiesRegistryCapabilityDeprecatedIterator, error) { var hashedCapabilityIdRule []interface{} for _, hashedCapabilityIdItem := range hashedCapabilityId { hashedCapabilityIdRule = append(hashedCapabilityIdRule, hashedCapabilityIdItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "CapabilityDeprecated", hashedCapabilityIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "CapabilityDeprecated", hashedCapabilityIdRule) if err != nil { return nil, err } - return &CapabilityRegistryCapabilityDeprecatedIterator{contract: _CapabilityRegistry.contract, event: "CapabilityDeprecated", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryCapabilityDeprecatedIterator{contract: _CapabilitiesRegistry.contract, event: "CapabilityDeprecated", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityDeprecated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityDeprecated, hashedCapabilityId [][32]byte) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchCapabilityDeprecated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryCapabilityDeprecated, hashedCapabilityId [][32]byte) (event.Subscription, error) { var hashedCapabilityIdRule []interface{} for _, hashedCapabilityIdItem := range hashedCapabilityId { hashedCapabilityIdRule = append(hashedCapabilityIdRule, hashedCapabilityIdItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "CapabilityDeprecated", hashedCapabilityIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "CapabilityDeprecated", hashedCapabilityIdRule) if err != nil { return nil, err } @@ -890,8 +890,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityDeprecated select { case log := <-logs: - event := new(CapabilityRegistryCapabilityDeprecated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityDeprecated", log); err != nil { + event := new(CapabilitiesRegistryCapabilityDeprecated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "CapabilityDeprecated", log); err != nil { return err } event.Raw = log @@ -912,17 +912,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchCapabilityDeprecated }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseCapabilityDeprecated(log types.Log) (*CapabilityRegistryCapabilityDeprecated, error) { - event := new(CapabilityRegistryCapabilityDeprecated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "CapabilityDeprecated", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseCapabilityDeprecated(log types.Log) (*CapabilitiesRegistryCapabilityDeprecated, error) { + event := new(CapabilitiesRegistryCapabilityDeprecated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "CapabilityDeprecated", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryConfigSetIterator struct { - Event *CapabilityRegistryConfigSet +type CapabilitiesRegistryConfigSetIterator struct { + Event *CapabilitiesRegistryConfigSet contract *bind.BoundContract event string @@ -933,7 +933,7 @@ type CapabilityRegistryConfigSetIterator struct { fail error } -func (it *CapabilityRegistryConfigSetIterator) Next() bool { +func (it *CapabilitiesRegistryConfigSetIterator) Next() bool { if it.fail != nil { return false @@ -942,7 +942,7 @@ func (it *CapabilityRegistryConfigSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryConfigSet) + it.Event = new(CapabilitiesRegistryConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -957,7 +957,7 @@ func (it *CapabilityRegistryConfigSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryConfigSet) + it.Event = new(CapabilitiesRegistryConfigSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -972,33 +972,33 @@ func (it *CapabilityRegistryConfigSetIterator) Next() bool { } } -func (it *CapabilityRegistryConfigSetIterator) Error() error { +func (it *CapabilitiesRegistryConfigSetIterator) Error() error { return it.fail } -func (it *CapabilityRegistryConfigSetIterator) Close() error { +func (it *CapabilitiesRegistryConfigSetIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryConfigSet struct { +type CapabilitiesRegistryConfigSet struct { DonId uint32 ConfigCount uint32 Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterConfigSet(opts *bind.FilterOpts) (*CapabilityRegistryConfigSetIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterConfigSet(opts *bind.FilterOpts) (*CapabilitiesRegistryConfigSetIterator, error) { - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "ConfigSet") + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "ConfigSet") if err != nil { return nil, err } - return &CapabilityRegistryConfigSetIterator{contract: _CapabilityRegistry.contract, event: "ConfigSet", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryConfigSetIterator{contract: _CapabilitiesRegistry.contract, event: "ConfigSet", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryConfigSet) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryConfigSet) (event.Subscription, error) { - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "ConfigSet") + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "ConfigSet") if err != nil { return nil, err } @@ -1008,8 +1008,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchConfigSet(opts *bind select { case log := <-logs: - event := new(CapabilityRegistryConfigSet) - if err := _CapabilityRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { + event := new(CapabilitiesRegistryConfigSet) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { return err } event.Raw = log @@ -1030,17 +1030,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchConfigSet(opts *bind }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseConfigSet(log types.Log) (*CapabilityRegistryConfigSet, error) { - event := new(CapabilityRegistryConfigSet) - if err := _CapabilityRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseConfigSet(log types.Log) (*CapabilitiesRegistryConfigSet, error) { + event := new(CapabilitiesRegistryConfigSet) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeAddedIterator struct { - Event *CapabilityRegistryNodeAdded +type CapabilitiesRegistryNodeAddedIterator struct { + Event *CapabilitiesRegistryNodeAdded contract *bind.BoundContract event string @@ -1051,7 +1051,7 @@ type CapabilityRegistryNodeAddedIterator struct { fail error } -func (it *CapabilityRegistryNodeAddedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeAddedIterator) Next() bool { if it.fail != nil { return false @@ -1060,7 +1060,7 @@ func (it *CapabilityRegistryNodeAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeAdded) + it.Event = new(CapabilitiesRegistryNodeAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1075,7 +1075,7 @@ func (it *CapabilityRegistryNodeAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeAdded) + it.Event = new(CapabilitiesRegistryNodeAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1090,44 +1090,44 @@ func (it *CapabilityRegistryNodeAddedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeAddedIterator) Error() error { +func (it *CapabilitiesRegistryNodeAddedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeAddedIterator) Close() error { +func (it *CapabilitiesRegistryNodeAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeAdded struct { +type CapabilitiesRegistryNodeAdded struct { P2pId [32]byte NodeOperatorId uint32 Signer [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeAdded(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeAddedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeAdded(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeAddedIterator, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeAdded", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeAdded", nodeOperatorIdRule) if err != nil { return nil, err } - return &CapabilityRegistryNodeAddedIterator{contract: _CapabilityRegistry.contract, event: "NodeAdded", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeAddedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeAdded", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeAdded, nodeOperatorId []uint32) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeAdded, nodeOperatorId []uint32) (event.Subscription, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeAdded", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeAdded", nodeOperatorIdRule) if err != nil { return nil, err } @@ -1137,8 +1137,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeAdded(opts *bind select { case log := <-logs: - event := new(CapabilityRegistryNodeAdded) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeAdded", log); err != nil { + event := new(CapabilitiesRegistryNodeAdded) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeAdded", log); err != nil { return err } event.Raw = log @@ -1159,17 +1159,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeAdded(opts *bind }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeAdded(log types.Log) (*CapabilityRegistryNodeAdded, error) { - event := new(CapabilityRegistryNodeAdded) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeAdded", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeAdded(log types.Log) (*CapabilitiesRegistryNodeAdded, error) { + event := new(CapabilitiesRegistryNodeAdded) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeOperatorAddedIterator struct { - Event *CapabilityRegistryNodeOperatorAdded +type CapabilitiesRegistryNodeOperatorAddedIterator struct { + Event *CapabilitiesRegistryNodeOperatorAdded contract *bind.BoundContract event string @@ -1180,7 +1180,7 @@ type CapabilityRegistryNodeOperatorAddedIterator struct { fail error } -func (it *CapabilityRegistryNodeOperatorAddedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeOperatorAddedIterator) Next() bool { if it.fail != nil { return false @@ -1189,7 +1189,7 @@ func (it *CapabilityRegistryNodeOperatorAddedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorAdded) + it.Event = new(CapabilitiesRegistryNodeOperatorAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1204,7 +1204,7 @@ func (it *CapabilityRegistryNodeOperatorAddedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorAdded) + it.Event = new(CapabilitiesRegistryNodeOperatorAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1219,23 +1219,23 @@ func (it *CapabilityRegistryNodeOperatorAddedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeOperatorAddedIterator) Error() error { +func (it *CapabilitiesRegistryNodeOperatorAddedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeOperatorAddedIterator) Close() error { +func (it *CapabilitiesRegistryNodeOperatorAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeOperatorAdded struct { +type CapabilitiesRegistryNodeOperatorAdded struct { NodeOperatorId uint32 Admin common.Address Name string Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorAdded(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorAddedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeOperatorAdded(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilitiesRegistryNodeOperatorAddedIterator, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { @@ -1246,14 +1246,14 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorAdded(o adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorAdded", nodeOperatorIdRule, adminRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeOperatorAdded", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } - return &CapabilityRegistryNodeOperatorAddedIterator{contract: _CapabilityRegistry.contract, event: "NodeOperatorAdded", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeOperatorAddedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeOperatorAdded", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorAdded, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorAdded, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { @@ -1264,7 +1264,7 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorAdded(op adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorAdded", nodeOperatorIdRule, adminRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeOperatorAdded", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } @@ -1274,8 +1274,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorAdded(op select { case log := <-logs: - event := new(CapabilityRegistryNodeOperatorAdded) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorAdded", log); err != nil { + event := new(CapabilitiesRegistryNodeOperatorAdded) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorAdded", log); err != nil { return err } event.Raw = log @@ -1296,17 +1296,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorAdded(op }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeOperatorAdded(log types.Log) (*CapabilityRegistryNodeOperatorAdded, error) { - event := new(CapabilityRegistryNodeOperatorAdded) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorAdded", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeOperatorAdded(log types.Log) (*CapabilitiesRegistryNodeOperatorAdded, error) { + event := new(CapabilitiesRegistryNodeOperatorAdded) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeOperatorRemovedIterator struct { - Event *CapabilityRegistryNodeOperatorRemoved +type CapabilitiesRegistryNodeOperatorRemovedIterator struct { + Event *CapabilitiesRegistryNodeOperatorRemoved contract *bind.BoundContract event string @@ -1317,7 +1317,7 @@ type CapabilityRegistryNodeOperatorRemovedIterator struct { fail error } -func (it *CapabilityRegistryNodeOperatorRemovedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeOperatorRemovedIterator) Next() bool { if it.fail != nil { return false @@ -1326,7 +1326,7 @@ func (it *CapabilityRegistryNodeOperatorRemovedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorRemoved) + it.Event = new(CapabilitiesRegistryNodeOperatorRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1341,7 +1341,7 @@ func (it *CapabilityRegistryNodeOperatorRemovedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorRemoved) + it.Event = new(CapabilitiesRegistryNodeOperatorRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1356,42 +1356,42 @@ func (it *CapabilityRegistryNodeOperatorRemovedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeOperatorRemovedIterator) Error() error { +func (it *CapabilitiesRegistryNodeOperatorRemovedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeOperatorRemovedIterator) Close() error { +func (it *CapabilitiesRegistryNodeOperatorRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeOperatorRemoved struct { +type CapabilitiesRegistryNodeOperatorRemoved struct { NodeOperatorId uint32 Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorRemoved(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeOperatorRemovedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeOperatorRemoved(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeOperatorRemovedIterator, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorRemoved", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeOperatorRemoved", nodeOperatorIdRule) if err != nil { return nil, err } - return &CapabilityRegistryNodeOperatorRemovedIterator{contract: _CapabilityRegistry.contract, event: "NodeOperatorRemoved", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeOperatorRemovedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeOperatorRemoved", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorRemoved, nodeOperatorId []uint32) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorRemoved, nodeOperatorId []uint32) (event.Subscription, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorRemoved", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeOperatorRemoved", nodeOperatorIdRule) if err != nil { return nil, err } @@ -1401,8 +1401,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorRemoved( select { case log := <-logs: - event := new(CapabilityRegistryNodeOperatorRemoved) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorRemoved", log); err != nil { + event := new(CapabilitiesRegistryNodeOperatorRemoved) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorRemoved", log); err != nil { return err } event.Raw = log @@ -1423,17 +1423,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorRemoved( }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeOperatorRemoved(log types.Log) (*CapabilityRegistryNodeOperatorRemoved, error) { - event := new(CapabilityRegistryNodeOperatorRemoved) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorRemoved", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeOperatorRemoved(log types.Log) (*CapabilitiesRegistryNodeOperatorRemoved, error) { + event := new(CapabilitiesRegistryNodeOperatorRemoved) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorRemoved", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeOperatorUpdatedIterator struct { - Event *CapabilityRegistryNodeOperatorUpdated +type CapabilitiesRegistryNodeOperatorUpdatedIterator struct { + Event *CapabilitiesRegistryNodeOperatorUpdated contract *bind.BoundContract event string @@ -1444,7 +1444,7 @@ type CapabilityRegistryNodeOperatorUpdatedIterator struct { fail error } -func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeOperatorUpdatedIterator) Next() bool { if it.fail != nil { return false @@ -1453,7 +1453,7 @@ func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorUpdated) + it.Event = new(CapabilitiesRegistryNodeOperatorUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1468,7 +1468,7 @@ func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeOperatorUpdated) + it.Event = new(CapabilitiesRegistryNodeOperatorUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1483,23 +1483,23 @@ func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Error() error { +func (it *CapabilitiesRegistryNodeOperatorUpdatedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeOperatorUpdatedIterator) Close() error { +func (it *CapabilitiesRegistryNodeOperatorUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeOperatorUpdated struct { +type CapabilitiesRegistryNodeOperatorUpdated struct { NodeOperatorId uint32 Admin common.Address Name string Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorUpdatedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeOperatorUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilitiesRegistryNodeOperatorUpdatedIterator, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { @@ -1510,14 +1510,14 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeOperatorUpdated adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeOperatorUpdated", nodeOperatorIdRule, adminRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeOperatorUpdated", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } - return &CapabilityRegistryNodeOperatorUpdatedIterator{contract: _CapabilityRegistry.contract, event: "NodeOperatorUpdated", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeOperatorUpdatedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeOperatorUpdated", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorUpdated, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorUpdated, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { @@ -1528,7 +1528,7 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorUpdated( adminRule = append(adminRule, adminItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeOperatorUpdated", nodeOperatorIdRule, adminRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeOperatorUpdated", nodeOperatorIdRule, adminRule) if err != nil { return nil, err } @@ -1538,8 +1538,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorUpdated( select { case log := <-logs: - event := new(CapabilityRegistryNodeOperatorUpdated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorUpdated", log); err != nil { + event := new(CapabilitiesRegistryNodeOperatorUpdated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorUpdated", log); err != nil { return err } event.Raw = log @@ -1560,17 +1560,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeOperatorUpdated( }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeOperatorUpdated(log types.Log) (*CapabilityRegistryNodeOperatorUpdated, error) { - event := new(CapabilityRegistryNodeOperatorUpdated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeOperatorUpdated", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeOperatorUpdated(log types.Log) (*CapabilitiesRegistryNodeOperatorUpdated, error) { + event := new(CapabilitiesRegistryNodeOperatorUpdated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeOperatorUpdated", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeRemovedIterator struct { - Event *CapabilityRegistryNodeRemoved +type CapabilitiesRegistryNodeRemovedIterator struct { + Event *CapabilitiesRegistryNodeRemoved contract *bind.BoundContract event string @@ -1581,7 +1581,7 @@ type CapabilityRegistryNodeRemovedIterator struct { fail error } -func (it *CapabilityRegistryNodeRemovedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeRemovedIterator) Next() bool { if it.fail != nil { return false @@ -1590,7 +1590,7 @@ func (it *CapabilityRegistryNodeRemovedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeRemoved) + it.Event = new(CapabilitiesRegistryNodeRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1605,7 +1605,7 @@ func (it *CapabilityRegistryNodeRemovedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeRemoved) + it.Event = new(CapabilitiesRegistryNodeRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1620,32 +1620,32 @@ func (it *CapabilityRegistryNodeRemovedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeRemovedIterator) Error() error { +func (it *CapabilitiesRegistryNodeRemovedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeRemovedIterator) Close() error { +func (it *CapabilitiesRegistryNodeRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeRemoved struct { +type CapabilitiesRegistryNodeRemoved struct { P2pId [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeRemoved(opts *bind.FilterOpts) (*CapabilityRegistryNodeRemovedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeRemoved(opts *bind.FilterOpts) (*CapabilitiesRegistryNodeRemovedIterator, error) { - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeRemoved") + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeRemoved") if err != nil { return nil, err } - return &CapabilityRegistryNodeRemovedIterator{contract: _CapabilityRegistry.contract, event: "NodeRemoved", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeRemovedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeRemoved", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeRemoved) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeRemoved(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeRemoved) (event.Subscription, error) { - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeRemoved") + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeRemoved") if err != nil { return nil, err } @@ -1655,8 +1655,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeRemoved(opts *bi select { case log := <-logs: - event := new(CapabilityRegistryNodeRemoved) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeRemoved", log); err != nil { + event := new(CapabilitiesRegistryNodeRemoved) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeRemoved", log); err != nil { return err } event.Raw = log @@ -1677,17 +1677,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeRemoved(opts *bi }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeRemoved(log types.Log) (*CapabilityRegistryNodeRemoved, error) { - event := new(CapabilityRegistryNodeRemoved) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeRemoved", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeRemoved(log types.Log) (*CapabilitiesRegistryNodeRemoved, error) { + event := new(CapabilitiesRegistryNodeRemoved) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeRemoved", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryNodeUpdatedIterator struct { - Event *CapabilityRegistryNodeUpdated +type CapabilitiesRegistryNodeUpdatedIterator struct { + Event *CapabilitiesRegistryNodeUpdated contract *bind.BoundContract event string @@ -1698,7 +1698,7 @@ type CapabilityRegistryNodeUpdatedIterator struct { fail error } -func (it *CapabilityRegistryNodeUpdatedIterator) Next() bool { +func (it *CapabilitiesRegistryNodeUpdatedIterator) Next() bool { if it.fail != nil { return false @@ -1707,7 +1707,7 @@ func (it *CapabilityRegistryNodeUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeUpdated) + it.Event = new(CapabilitiesRegistryNodeUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1722,7 +1722,7 @@ func (it *CapabilityRegistryNodeUpdatedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryNodeUpdated) + it.Event = new(CapabilitiesRegistryNodeUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1737,44 +1737,44 @@ func (it *CapabilityRegistryNodeUpdatedIterator) Next() bool { } } -func (it *CapabilityRegistryNodeUpdatedIterator) Error() error { +func (it *CapabilitiesRegistryNodeUpdatedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryNodeUpdatedIterator) Close() error { +func (it *CapabilitiesRegistryNodeUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryNodeUpdated struct { +type CapabilitiesRegistryNodeUpdated struct { P2pId [32]byte NodeOperatorId uint32 Signer [32]byte Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterNodeUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeUpdatedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterNodeUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeUpdatedIterator, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "NodeUpdated", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "NodeUpdated", nodeOperatorIdRule) if err != nil { return nil, err } - return &CapabilityRegistryNodeUpdatedIterator{contract: _CapabilityRegistry.contract, event: "NodeUpdated", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryNodeUpdatedIterator{contract: _CapabilitiesRegistry.contract, event: "NodeUpdated", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeUpdated, nodeOperatorId []uint32) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeUpdated, nodeOperatorId []uint32) (event.Subscription, error) { var nodeOperatorIdRule []interface{} for _, nodeOperatorIdItem := range nodeOperatorId { nodeOperatorIdRule = append(nodeOperatorIdRule, nodeOperatorIdItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "NodeUpdated", nodeOperatorIdRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "NodeUpdated", nodeOperatorIdRule) if err != nil { return nil, err } @@ -1784,8 +1784,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeUpdated(opts *bi select { case log := <-logs: - event := new(CapabilityRegistryNodeUpdated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeUpdated", log); err != nil { + event := new(CapabilitiesRegistryNodeUpdated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeUpdated", log); err != nil { return err } event.Raw = log @@ -1806,17 +1806,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchNodeUpdated(opts *bi }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseNodeUpdated(log types.Log) (*CapabilityRegistryNodeUpdated, error) { - event := new(CapabilityRegistryNodeUpdated) - if err := _CapabilityRegistry.contract.UnpackLog(event, "NodeUpdated", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseNodeUpdated(log types.Log) (*CapabilitiesRegistryNodeUpdated, error) { + event := new(CapabilitiesRegistryNodeUpdated) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "NodeUpdated", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryOwnershipTransferRequestedIterator struct { - Event *CapabilityRegistryOwnershipTransferRequested +type CapabilitiesRegistryOwnershipTransferRequestedIterator struct { + Event *CapabilitiesRegistryOwnershipTransferRequested contract *bind.BoundContract event string @@ -1827,7 +1827,7 @@ type CapabilityRegistryOwnershipTransferRequestedIterator struct { fail error } -func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Next() bool { +func (it *CapabilitiesRegistryOwnershipTransferRequestedIterator) Next() bool { if it.fail != nil { return false @@ -1836,7 +1836,7 @@ func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryOwnershipTransferRequested) + it.Event = new(CapabilitiesRegistryOwnershipTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1851,7 +1851,7 @@ func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryOwnershipTransferRequested) + it.Event = new(CapabilitiesRegistryOwnershipTransferRequested) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1866,22 +1866,22 @@ func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Next() bool { } } -func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Error() error { +func (it *CapabilitiesRegistryOwnershipTransferRequestedIterator) Error() error { return it.fail } -func (it *CapabilityRegistryOwnershipTransferRequestedIterator) Close() error { +func (it *CapabilitiesRegistryOwnershipTransferRequestedIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryOwnershipTransferRequested struct { +type CapabilitiesRegistryOwnershipTransferRequested struct { From common.Address To common.Address Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilityRegistryOwnershipTransferRequestedIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilitiesRegistryOwnershipTransferRequestedIterator, error) { var fromRule []interface{} for _, fromItem := range from { @@ -1892,14 +1892,14 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterOwnershipTransferRe toRule = append(toRule, toItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) if err != nil { return nil, err } - return &CapabilityRegistryOwnershipTransferRequestedIterator{contract: _CapabilityRegistry.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryOwnershipTransferRequestedIterator{contract: _CapabilitiesRegistry.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { @@ -1910,7 +1910,7 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferReq toRule = append(toRule, toItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) if err != nil { return nil, err } @@ -1920,8 +1920,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferReq select { case log := <-logs: - event := new(CapabilityRegistryOwnershipTransferRequested) - if err := _CapabilityRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + event := new(CapabilitiesRegistryOwnershipTransferRequested) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { return err } event.Raw = log @@ -1942,17 +1942,17 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferReq }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseOwnershipTransferRequested(log types.Log) (*CapabilityRegistryOwnershipTransferRequested, error) { - event := new(CapabilityRegistryOwnershipTransferRequested) - if err := _CapabilityRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseOwnershipTransferRequested(log types.Log) (*CapabilitiesRegistryOwnershipTransferRequested, error) { + event := new(CapabilitiesRegistryOwnershipTransferRequested) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { return nil, err } event.Raw = log return event, nil } -type CapabilityRegistryOwnershipTransferredIterator struct { - Event *CapabilityRegistryOwnershipTransferred +type CapabilitiesRegistryOwnershipTransferredIterator struct { + Event *CapabilitiesRegistryOwnershipTransferred contract *bind.BoundContract event string @@ -1963,7 +1963,7 @@ type CapabilityRegistryOwnershipTransferredIterator struct { fail error } -func (it *CapabilityRegistryOwnershipTransferredIterator) Next() bool { +func (it *CapabilitiesRegistryOwnershipTransferredIterator) Next() bool { if it.fail != nil { return false @@ -1972,7 +1972,7 @@ func (it *CapabilityRegistryOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryOwnershipTransferred) + it.Event = new(CapabilitiesRegistryOwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1987,7 +1987,7 @@ func (it *CapabilityRegistryOwnershipTransferredIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(CapabilityRegistryOwnershipTransferred) + it.Event = new(CapabilitiesRegistryOwnershipTransferred) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2002,22 +2002,22 @@ func (it *CapabilityRegistryOwnershipTransferredIterator) Next() bool { } } -func (it *CapabilityRegistryOwnershipTransferredIterator) Error() error { +func (it *CapabilitiesRegistryOwnershipTransferredIterator) Error() error { return it.fail } -func (it *CapabilityRegistryOwnershipTransferredIterator) Close() error { +func (it *CapabilitiesRegistryOwnershipTransferredIterator) Close() error { it.sub.Unsubscribe() return nil } -type CapabilityRegistryOwnershipTransferred struct { +type CapabilitiesRegistryOwnershipTransferred struct { From common.Address To common.Address Raw types.Log } -func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilityRegistryOwnershipTransferredIterator, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilitiesRegistryOwnershipTransferredIterator, error) { var fromRule []interface{} for _, fromItem := range from { @@ -2028,14 +2028,14 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) FilterOwnershipTransferre toRule = append(toRule, toItem) } - logs, sub, err := _CapabilityRegistry.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _CapabilitiesRegistry.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) if err != nil { return nil, err } - return &CapabilityRegistryOwnershipTransferredIterator{contract: _CapabilityRegistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &CapabilitiesRegistryOwnershipTransferredIterator{contract: _CapabilitiesRegistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { @@ -2046,7 +2046,7 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferred toRule = append(toRule, toItem) } - logs, sub, err := _CapabilityRegistry.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + logs, sub, err := _CapabilitiesRegistry.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) if err != nil { return nil, err } @@ -2056,8 +2056,8 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferred select { case log := <-logs: - event := new(CapabilityRegistryOwnershipTransferred) - if err := _CapabilityRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(CapabilitiesRegistryOwnershipTransferred) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return err } event.Raw = log @@ -2078,9 +2078,9 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) WatchOwnershipTransferred }), nil } -func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*CapabilityRegistryOwnershipTransferred, error) { - event := new(CapabilityRegistryOwnershipTransferred) - if err := _CapabilityRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*CapabilitiesRegistryOwnershipTransferred, error) { + event := new(CapabilitiesRegistryOwnershipTransferred) + if err := _CapabilitiesRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return nil, err } event.Raw = log @@ -2089,109 +2089,109 @@ func (_CapabilityRegistry *CapabilityRegistryFilterer) ParseOwnershipTransferred type GetCapabilities struct { HashedCapabilityIds [][32]byte - Capabilities []CapabilityRegistryCapability + Capabilities []CapabilitiesRegistryCapability } -func (_CapabilityRegistry *CapabilityRegistry) ParseLog(log types.Log) (generated.AbigenLog, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistry) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { - case _CapabilityRegistry.abi.Events["CapabilityConfigured"].ID: - return _CapabilityRegistry.ParseCapabilityConfigured(log) - case _CapabilityRegistry.abi.Events["CapabilityDeprecated"].ID: - return _CapabilityRegistry.ParseCapabilityDeprecated(log) - case _CapabilityRegistry.abi.Events["ConfigSet"].ID: - return _CapabilityRegistry.ParseConfigSet(log) - case _CapabilityRegistry.abi.Events["NodeAdded"].ID: - return _CapabilityRegistry.ParseNodeAdded(log) - case _CapabilityRegistry.abi.Events["NodeOperatorAdded"].ID: - return _CapabilityRegistry.ParseNodeOperatorAdded(log) - case _CapabilityRegistry.abi.Events["NodeOperatorRemoved"].ID: - return _CapabilityRegistry.ParseNodeOperatorRemoved(log) - case _CapabilityRegistry.abi.Events["NodeOperatorUpdated"].ID: - return _CapabilityRegistry.ParseNodeOperatorUpdated(log) - case _CapabilityRegistry.abi.Events["NodeRemoved"].ID: - return _CapabilityRegistry.ParseNodeRemoved(log) - case _CapabilityRegistry.abi.Events["NodeUpdated"].ID: - return _CapabilityRegistry.ParseNodeUpdated(log) - case _CapabilityRegistry.abi.Events["OwnershipTransferRequested"].ID: - return _CapabilityRegistry.ParseOwnershipTransferRequested(log) - case _CapabilityRegistry.abi.Events["OwnershipTransferred"].ID: - return _CapabilityRegistry.ParseOwnershipTransferred(log) + case _CapabilitiesRegistry.abi.Events["CapabilityConfigured"].ID: + return _CapabilitiesRegistry.ParseCapabilityConfigured(log) + case _CapabilitiesRegistry.abi.Events["CapabilityDeprecated"].ID: + return _CapabilitiesRegistry.ParseCapabilityDeprecated(log) + case _CapabilitiesRegistry.abi.Events["ConfigSet"].ID: + return _CapabilitiesRegistry.ParseConfigSet(log) + case _CapabilitiesRegistry.abi.Events["NodeAdded"].ID: + return _CapabilitiesRegistry.ParseNodeAdded(log) + case _CapabilitiesRegistry.abi.Events["NodeOperatorAdded"].ID: + return _CapabilitiesRegistry.ParseNodeOperatorAdded(log) + case _CapabilitiesRegistry.abi.Events["NodeOperatorRemoved"].ID: + return _CapabilitiesRegistry.ParseNodeOperatorRemoved(log) + case _CapabilitiesRegistry.abi.Events["NodeOperatorUpdated"].ID: + return _CapabilitiesRegistry.ParseNodeOperatorUpdated(log) + case _CapabilitiesRegistry.abi.Events["NodeRemoved"].ID: + return _CapabilitiesRegistry.ParseNodeRemoved(log) + case _CapabilitiesRegistry.abi.Events["NodeUpdated"].ID: + return _CapabilitiesRegistry.ParseNodeUpdated(log) + case _CapabilitiesRegistry.abi.Events["OwnershipTransferRequested"].ID: + return _CapabilitiesRegistry.ParseOwnershipTransferRequested(log) + case _CapabilitiesRegistry.abi.Events["OwnershipTransferred"].ID: + return _CapabilitiesRegistry.ParseOwnershipTransferred(log) default: return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) } } -func (CapabilityRegistryCapabilityConfigured) Topic() common.Hash { +func (CapabilitiesRegistryCapabilityConfigured) Topic() common.Hash { return common.HexToHash("0x04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae") } -func (CapabilityRegistryCapabilityDeprecated) Topic() common.Hash { +func (CapabilitiesRegistryCapabilityDeprecated) Topic() common.Hash { return common.HexToHash("0xdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf21") } -func (CapabilityRegistryConfigSet) Topic() common.Hash { +func (CapabilitiesRegistryConfigSet) Topic() common.Hash { return common.HexToHash("0xf264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651") } -func (CapabilityRegistryNodeAdded) Topic() common.Hash { +func (CapabilitiesRegistryNodeAdded) Topic() common.Hash { return common.HexToHash("0x74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05") } -func (CapabilityRegistryNodeOperatorAdded) Topic() common.Hash { +func (CapabilitiesRegistryNodeOperatorAdded) Topic() common.Hash { return common.HexToHash("0x78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e") } -func (CapabilityRegistryNodeOperatorRemoved) Topic() common.Hash { +func (CapabilitiesRegistryNodeOperatorRemoved) Topic() common.Hash { return common.HexToHash("0xa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a") } -func (CapabilityRegistryNodeOperatorUpdated) Topic() common.Hash { +func (CapabilitiesRegistryNodeOperatorUpdated) Topic() common.Hash { return common.HexToHash("0x86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a28") } -func (CapabilityRegistryNodeRemoved) Topic() common.Hash { +func (CapabilitiesRegistryNodeRemoved) Topic() common.Hash { return common.HexToHash("0x5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb9753205") } -func (CapabilityRegistryNodeUpdated) Topic() common.Hash { +func (CapabilitiesRegistryNodeUpdated) Topic() common.Hash { return common.HexToHash("0x4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b") } -func (CapabilityRegistryOwnershipTransferRequested) Topic() common.Hash { +func (CapabilitiesRegistryOwnershipTransferRequested) Topic() common.Hash { return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") } -func (CapabilityRegistryOwnershipTransferred) Topic() common.Hash { +func (CapabilitiesRegistryOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } -func (_CapabilityRegistry *CapabilityRegistry) Address() common.Address { - return _CapabilityRegistry.address +func (_CapabilitiesRegistry *CapabilitiesRegistry) Address() common.Address { + return _CapabilitiesRegistry.address } -type CapabilityRegistryInterface interface { +type CapabilitiesRegistryInterface interface { GetCapabilities(opts *bind.CallOpts) (GetCapabilities, error) - GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilityRegistryCapability, error) + GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilitiesRegistryCapability, error) GetCapabilityConfigs(opts *bind.CallOpts, donId uint32, capabilityId [32]byte) ([]byte, []byte, error) - GetDON(opts *bind.CallOpts, donId uint32) (CapabilityRegistryDONInfo, error) + GetDON(opts *bind.CallOpts, donId uint32) (CapabilitiesRegistryDONInfo, error) - GetDONs(opts *bind.CallOpts) ([]CapabilityRegistryDONInfo, error) + GetDONs(opts *bind.CallOpts) ([]CapabilitiesRegistryDONInfo, error) GetHashedCapabilityId(opts *bind.CallOpts, labelledName string, version string) ([32]byte, error) - GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilityRegistryNodeInfo, error) + GetNode(opts *bind.CallOpts, p2pId [32]byte) (CapabilitiesRegistryNodeInfo, error) - GetNodeOperator(opts *bind.CallOpts, nodeOperatorId uint32) (CapabilityRegistryNodeOperator, error) + GetNodeOperator(opts *bind.CallOpts, nodeOperatorId uint32) (CapabilitiesRegistryNodeOperator, error) - GetNodeOperators(opts *bind.CallOpts) ([]CapabilityRegistryNodeOperator, error) + GetNodeOperators(opts *bind.CallOpts) ([]CapabilitiesRegistryNodeOperator, error) - GetNodes(opts *bind.CallOpts) ([]CapabilityRegistryNodeInfo, error) + GetNodes(opts *bind.CallOpts) ([]CapabilitiesRegistryNodeInfo, error) IsCapabilityDeprecated(opts *bind.CallOpts, hashedCapabilityId [32]byte) (bool, error) @@ -2201,13 +2201,13 @@ type CapabilityRegistryInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - AddCapabilities(opts *bind.TransactOpts, capabilities []CapabilityRegistryCapability) (*types.Transaction, error) + AddCapabilities(opts *bind.TransactOpts, capabilities []CapabilitiesRegistryCapability) (*types.Transaction, error) - AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) + AddDON(opts *bind.TransactOpts, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) - AddNodeOperators(opts *bind.TransactOpts, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) + AddNodeOperators(opts *bind.TransactOpts, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) - AddNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) + AddNodes(opts *bind.TransactOpts, nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) DeprecateCapabilities(opts *bind.TransactOpts, hashedCapabilityIds [][32]byte) (*types.Transaction, error) @@ -2219,77 +2219,77 @@ type CapabilityRegistryInterface interface { TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilityRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) + UpdateDON(opts *bind.TransactOpts, donId uint32, nodes [][32]byte, capabilityConfigurations []CapabilitiesRegistryCapabilityConfiguration, isPublic bool, acceptsWorkflows bool, f uint8) (*types.Transaction, error) - UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilityRegistryNodeOperator) (*types.Transaction, error) + UpdateNodeOperators(opts *bind.TransactOpts, nodeOperatorIds []uint32, nodeOperators []CapabilitiesRegistryNodeOperator) (*types.Transaction, error) - UpdateNodes(opts *bind.TransactOpts, nodes []CapabilityRegistryNodeParams) (*types.Transaction, error) + UpdateNodes(opts *bind.TransactOpts, nodes []CapabilitiesRegistryNodeParams) (*types.Transaction, error) - FilterCapabilityConfigured(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityConfiguredIterator, error) + FilterCapabilityConfigured(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilitiesRegistryCapabilityConfiguredIterator, error) - WatchCapabilityConfigured(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityConfigured, hashedCapabilityId [][32]byte) (event.Subscription, error) + WatchCapabilityConfigured(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryCapabilityConfigured, hashedCapabilityId [][32]byte) (event.Subscription, error) - ParseCapabilityConfigured(log types.Log) (*CapabilityRegistryCapabilityConfigured, error) + ParseCapabilityConfigured(log types.Log) (*CapabilitiesRegistryCapabilityConfigured, error) - FilterCapabilityDeprecated(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilityRegistryCapabilityDeprecatedIterator, error) + FilterCapabilityDeprecated(opts *bind.FilterOpts, hashedCapabilityId [][32]byte) (*CapabilitiesRegistryCapabilityDeprecatedIterator, error) - WatchCapabilityDeprecated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryCapabilityDeprecated, hashedCapabilityId [][32]byte) (event.Subscription, error) + WatchCapabilityDeprecated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryCapabilityDeprecated, hashedCapabilityId [][32]byte) (event.Subscription, error) - ParseCapabilityDeprecated(log types.Log) (*CapabilityRegistryCapabilityDeprecated, error) + ParseCapabilityDeprecated(log types.Log) (*CapabilitiesRegistryCapabilityDeprecated, error) - FilterConfigSet(opts *bind.FilterOpts) (*CapabilityRegistryConfigSetIterator, error) + FilterConfigSet(opts *bind.FilterOpts) (*CapabilitiesRegistryConfigSetIterator, error) - WatchConfigSet(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryConfigSet) (event.Subscription, error) + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryConfigSet) (event.Subscription, error) - ParseConfigSet(log types.Log) (*CapabilityRegistryConfigSet, error) + ParseConfigSet(log types.Log) (*CapabilitiesRegistryConfigSet, error) - FilterNodeAdded(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeAddedIterator, error) + FilterNodeAdded(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeAddedIterator, error) - WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeAdded, nodeOperatorId []uint32) (event.Subscription, error) + WatchNodeAdded(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeAdded, nodeOperatorId []uint32) (event.Subscription, error) - ParseNodeAdded(log types.Log) (*CapabilityRegistryNodeAdded, error) + ParseNodeAdded(log types.Log) (*CapabilitiesRegistryNodeAdded, error) - FilterNodeOperatorAdded(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorAddedIterator, error) + FilterNodeOperatorAdded(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilitiesRegistryNodeOperatorAddedIterator, error) - WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorAdded, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) + WatchNodeOperatorAdded(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorAdded, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) - ParseNodeOperatorAdded(log types.Log) (*CapabilityRegistryNodeOperatorAdded, error) + ParseNodeOperatorAdded(log types.Log) (*CapabilitiesRegistryNodeOperatorAdded, error) - FilterNodeOperatorRemoved(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeOperatorRemovedIterator, error) + FilterNodeOperatorRemoved(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeOperatorRemovedIterator, error) - WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorRemoved, nodeOperatorId []uint32) (event.Subscription, error) + WatchNodeOperatorRemoved(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorRemoved, nodeOperatorId []uint32) (event.Subscription, error) - ParseNodeOperatorRemoved(log types.Log) (*CapabilityRegistryNodeOperatorRemoved, error) + ParseNodeOperatorRemoved(log types.Log) (*CapabilitiesRegistryNodeOperatorRemoved, error) - FilterNodeOperatorUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilityRegistryNodeOperatorUpdatedIterator, error) + FilterNodeOperatorUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32, admin []common.Address) (*CapabilitiesRegistryNodeOperatorUpdatedIterator, error) - WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeOperatorUpdated, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) + WatchNodeOperatorUpdated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeOperatorUpdated, nodeOperatorId []uint32, admin []common.Address) (event.Subscription, error) - ParseNodeOperatorUpdated(log types.Log) (*CapabilityRegistryNodeOperatorUpdated, error) + ParseNodeOperatorUpdated(log types.Log) (*CapabilitiesRegistryNodeOperatorUpdated, error) - FilterNodeRemoved(opts *bind.FilterOpts) (*CapabilityRegistryNodeRemovedIterator, error) + FilterNodeRemoved(opts *bind.FilterOpts) (*CapabilitiesRegistryNodeRemovedIterator, error) - WatchNodeRemoved(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeRemoved) (event.Subscription, error) + WatchNodeRemoved(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeRemoved) (event.Subscription, error) - ParseNodeRemoved(log types.Log) (*CapabilityRegistryNodeRemoved, error) + ParseNodeRemoved(log types.Log) (*CapabilitiesRegistryNodeRemoved, error) - FilterNodeUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilityRegistryNodeUpdatedIterator, error) + FilterNodeUpdated(opts *bind.FilterOpts, nodeOperatorId []uint32) (*CapabilitiesRegistryNodeUpdatedIterator, error) - WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryNodeUpdated, nodeOperatorId []uint32) (event.Subscription, error) + WatchNodeUpdated(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryNodeUpdated, nodeOperatorId []uint32) (event.Subscription, error) - ParseNodeUpdated(log types.Log) (*CapabilityRegistryNodeUpdated, error) + ParseNodeUpdated(log types.Log) (*CapabilitiesRegistryNodeUpdated, error) - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilityRegistryOwnershipTransferRequestedIterator, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilitiesRegistryOwnershipTransferRequestedIterator, error) - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - ParseOwnershipTransferRequested(log types.Log) (*CapabilityRegistryOwnershipTransferRequested, error) + ParseOwnershipTransferRequested(log types.Log) (*CapabilitiesRegistryOwnershipTransferRequested, error) - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilityRegistryOwnershipTransferredIterator, error) + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CapabilitiesRegistryOwnershipTransferredIterator, error) - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CapabilityRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CapabilitiesRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - ParseOwnershipTransferred(log types.Log) (*CapabilityRegistryOwnershipTransferred, error) + ParseOwnershipTransferred(log types.Log) (*CapabilitiesRegistryOwnershipTransferred, error) ParseLog(log types.Log) (generated.AbigenLog, error) diff --git a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt index e2a844c7b79..4a0d0d7c5a0 100644 --- a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -1,4 +1,4 @@ GETH_VERSION: 1.13.8 +capabilities_registry: ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.abi ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.bin 3a42a29db3b81e03f7fad6d872fa2182949643d8c1ed62c34a6af7520583eba4 forwarder: ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin bd15b7c5cecc87d44cac0b8414627cfb2c0e1cdd554df60a50dcb682f9a05129 -keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin c1e609950ee768884ba5ecd0ad8b998570d46e1c7ac281294e677e908113a6b7 ocr3_capability: ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin 144f23145878b95d1672e4919874eddeeaa38ce520d0edbe72c6677e39bb4741 diff --git a/core/gethwrappers/keystone/go_generate.go b/core/gethwrappers/keystone/go_generate.go index 679b678b8f2..e506e5d0bd0 100644 --- a/core/gethwrappers/keystone/go_generate.go +++ b/core/gethwrappers/keystone/go_generate.go @@ -6,4 +6,4 @@ package gethwrappers //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin KeystoneForwarder forwarder //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin OCR3Capability ocr3_capability -//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin CapabilityRegistry keystone_capability_registry +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.abi ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.bin CapabilitiesRegistry capabilities_registry diff --git a/core/services/standardcapabilities/standard_capabilities.go b/core/services/standardcapabilities/standard_capabilities.go index 67ee8e10902..a8d007d5df8 100644 --- a/core/services/standardcapabilities/standard_capabilities.go +++ b/core/services/standardcapabilities/standard_capabilities.go @@ -14,15 +14,15 @@ import ( type standardCapabilities struct { services.StateMachine - log logger.Logger - spec *job.StandardCapabilitiesSpec - pluginRegistrar plugins.RegistrarConfig - telemetryService core.TelemetryService - store core.KeyValueStore - capabilityRegistry core.CapabilitiesRegistry - errorLog core.ErrorLog - pipelineRunner core.PipelineRunnerService - relayerSet core.RelayerSet + log logger.Logger + spec *job.StandardCapabilitiesSpec + pluginRegistrar plugins.RegistrarConfig + telemetryService core.TelemetryService + store core.KeyValueStore + CapabilitiesRegistry core.CapabilitiesRegistry + errorLog core.ErrorLog + pipelineRunner core.PipelineRunnerService + relayerSet core.RelayerSet capabilitiesLoop *loop.StandardCapabilitiesService } @@ -31,20 +31,20 @@ func newStandardCapabilities(log logger.Logger, spec *job.StandardCapabilitiesSp pluginRegistrar plugins.RegistrarConfig, telemetryService core.TelemetryService, store core.KeyValueStore, - capabilityRegistry core.CapabilitiesRegistry, + CapabilitiesRegistry core.CapabilitiesRegistry, errorLog core.ErrorLog, pipelineRunner core.PipelineRunnerService, relayerSet core.RelayerSet) *standardCapabilities { return &standardCapabilities{ - log: log, - spec: spec, - pluginRegistrar: pluginRegistrar, - telemetryService: telemetryService, - store: store, - capabilityRegistry: capabilityRegistry, - errorLog: errorLog, - pipelineRunner: pipelineRunner, - relayerSet: relayerSet, + log: log, + spec: spec, + pluginRegistrar: pluginRegistrar, + telemetryService: telemetryService, + store: store, + CapabilitiesRegistry: CapabilitiesRegistry, + errorLog: errorLog, + pipelineRunner: pipelineRunner, + relayerSet: relayerSet, } } @@ -72,7 +72,7 @@ func (s *standardCapabilities) Start(ctx context.Context) error { return fmt.Errorf("error waiting for standard capabilities service to start: %v", err) } - if err = s.capabilitiesLoop.Service.Initialise(ctx, s.spec.Config, s.telemetryService, s.store, s.capabilityRegistry, s.errorLog, + if err = s.capabilitiesLoop.Service.Initialise(ctx, s.spec.Config, s.telemetryService, s.store, s.CapabilitiesRegistry, s.errorLog, s.pipelineRunner, s.relayerSet); err != nil { return fmt.Errorf("error initialising standard capabilities service: %v", err) } From 95f3e7be9809c71deb112657b83d5dc4cd47088b Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Mon, 17 Jun 2024 13:35:14 -0500 Subject: [PATCH 06/14] core/services/ocr2/plugins/mercury: fix integration test race on shared error (#13555) --- .../ocr2/plugins/mercury/integration_test.go | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/core/services/ocr2/plugins/mercury/integration_test.go b/core/services/ocr2/plugins/mercury/integration_test.go index 680b05bd4d4..7be5177f765 100644 --- a/core/services/ocr2/plugins/mercury/integration_test.go +++ b/core/services/ocr2/plugins/mercury/integration_test.go @@ -184,15 +184,17 @@ func integration_MercuryV1(t *testing.T) { bootstrapNode := Node{App: appBootstrap, KeyBundle: bootstrapKb} logObservers = append(logObservers, observedLogs) - // Commit blocks to finality depth to ensure LogPoller has finalized blocks to read from - ch, err := bootstrapNode.App.GetRelayers().LegacyEVMChains().Get(testutils.SimulatedChainID.String()) - require.NoError(t, err) - finalityDepth := ch.Config().EVM().FinalityDepth() - for i := 0; i < int(finalityDepth); i++ { - backend.Commit() - } - - fromBlock := int(finalityDepth) // cannot use zero, start from finality depth + // cannot use zero, start from finality depth + fromBlock := func() int { + // Commit blocks to finality depth to ensure LogPoller has finalized blocks to read from + ch, err := bootstrapNode.App.GetRelayers().LegacyEVMChains().Get(testutils.SimulatedChainID.String()) + require.NoError(t, err) + finalityDepth := ch.Config().EVM().FinalityDepth() + for i := 0; i < int(finalityDepth); i++ { + backend.Commit() + } + return int(finalityDepth) + }() // Set up n oracles var ( @@ -225,8 +227,7 @@ func integration_MercuryV1(t *testing.T) { createBridge := func(name string, i int, p *big.Int, borm bridges.ORM) (bridgeName string) { bridge := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - var b []byte - b, err = io.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) require.NoError(t, err) require.Equal(t, `{"data":{"from":"ETH","to":"USD"}}`, string(b)) From ba9b0cccb54be4bed0a401182a436a2bc40c4463 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Mon, 17 Jun 2024 13:52:18 -0500 Subject: [PATCH 07/14] go.md: add chainlink-integrations (#13548) --- go.md | 6 +++++- tools/bin/modgraph | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/go.md b/go.md index dd17f5207bd..dda7192c1a1 100644 --- a/go.md +++ b/go.md @@ -3,9 +3,13 @@ flowchart LR subgraph chains chainlink-cosmos - chainlink-evm chainlink-solana chainlink-starknet/relayer + subgraph chainlink-integrations + direction LR + chainlink-integrations/evm/relayer + chainlink-integrations/common + end end subgraph products diff --git a/tools/bin/modgraph b/tools/bin/modgraph index b61264cb021..4d8ad108c65 100755 --- a/tools/bin/modgraph +++ b/tools/bin/modgraph @@ -9,9 +9,13 @@ echo "# smartcontractkit Go modules flowchart LR subgraph chains chainlink-cosmos - chainlink-evm chainlink-solana chainlink-starknet/relayer + subgraph chainlink-integrations + direction LR + chainlink-integrations/evm/relayer + chainlink-integrations/common + end end subgraph products From c0f0c3884f73e9245461236fee126cde2ba63db2 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Mon, 17 Jun 2024 15:35:10 -0500 Subject: [PATCH 08/14] adjust eventually usages (#13556) --- common/client/poller_test.go | 7 ++++--- core/services/relay/evm/evmtesting/run_tests.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/client/poller_test.go b/common/client/poller_test.go index 82a05b5dfc7..bd475ef9293 100644 --- a/common/client/poller_test.go +++ b/common/client/poller_test.go @@ -13,6 +13,7 @@ import ( "go.uber.org/zap" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_Poller(t *testing.T) { @@ -89,7 +90,7 @@ func Test_Poller(t *testing.T) { } return true } - require.Eventually(t, logsSeen, time.Second, time.Millisecond) + require.Eventually(t, logsSeen, tests.WaitTimeout(t), 100*time.Millisecond) }) t.Run("Test polling timeout", func(t *testing.T) { @@ -114,7 +115,7 @@ func Test_Poller(t *testing.T) { logsSeen := func() bool { return observedLogs.FilterMessage("polling error: context deadline exceeded").Len() >= 1 } - require.Eventually(t, logsSeen, time.Second, time.Millisecond) + require.Eventually(t, logsSeen, tests.WaitTimeout(t), 100*time.Millisecond) }) t.Run("Test unsubscribe during polling", func(t *testing.T) { @@ -145,7 +146,7 @@ func Test_Poller(t *testing.T) { logsSeen := func() bool { return observedLogs.FilterMessage("polling error: context canceled").Len() >= 1 } - require.Eventually(t, logsSeen, time.Second, time.Millisecond) + require.Eventually(t, logsSeen, tests.WaitTimeout(t), 100*time.Millisecond) }) } diff --git a/core/services/relay/evm/evmtesting/run_tests.go b/core/services/relay/evm/evmtesting/run_tests.go index 2c492966729..3058784b30a 100644 --- a/core/services/relay/evm/evmtesting/run_tests.go +++ b/core/services/relay/evm/evmtesting/run_tests.go @@ -39,7 +39,7 @@ func RunChainReaderEvmTests[T TestingT[T]](t T, it *EVMChainReaderInterfaceTeste require.Eventually(t, func() bool { return cr.GetLatestValue(ctx, AnyContractName, triggerWithDynamicTopic, input, output) == nil - }, it.MaxWaitTimeForEvents(), time.Millisecond*10) + }, it.MaxWaitTimeForEvents(), 100*time.Millisecond) assert.Equal(t, &anyString, rOutput.FieldByName("Field").Interface()) topic, err := abi.MakeTopics([]any{anyString}) From 796073a82d8044d39e51b2bc97b4790bf6cc1124 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Mon, 17 Jun 2024 15:51:29 -0500 Subject: [PATCH 09/14] common/client: prevent double close of channel (#13571) --- common/client/poller_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/client/poller_test.go b/common/client/poller_test.go index bd475ef9293..91af579307b 100644 --- a/common/client/poller_test.go +++ b/common/client/poller_test.go @@ -120,8 +120,9 @@ func Test_Poller(t *testing.T) { t.Run("Test unsubscribe during polling", func(t *testing.T) { wait := make(chan struct{}) + closeOnce := sync.OnceFunc(func() { close(wait) }) pollFunc := func(ctx context.Context) (Head, error) { - close(wait) + closeOnce() // Block in polling function until context is cancelled if <-ctx.Done(); true { return nil, ctx.Err() From facd3b9eb524f56806892a5a3b122b056de72236 Mon Sep 17 00:00:00 2001 From: Sergey Kudasov Date: Mon, 17 Jun 2024 23:20:31 +0200 Subject: [PATCH 10/14] try action with bitnami full index from GitHub (#13579) * try action with bitnami full index from GitHub * try action with bitnami full index from GitHub * bump CI action dep * bump CI action dep --- .github/workflows/automation-benchmark-tests.yml | 2 +- .github/workflows/automation-load-tests.yml | 2 +- .github/workflows/automation-nightly-tests.yml | 2 +- .github/workflows/automation-ondemand-tests.yml | 2 +- .github/workflows/client-compatibility-tests.yml | 2 +- .../workflows/evm-version-compatibility-tests.yml | 2 +- .github/workflows/integration-chaos-tests.yml | 2 +- .github/workflows/integration-tests.yml | 14 +++++++------- .github/workflows/on-demand-keeper-smoke-tests.yml | 2 +- .github/workflows/on-demand-ocr-soak-test.yml | 2 +- .../on-demand-vrfv2-eth2-clients-test.yml | 2 +- .../workflows/on-demand-vrfv2-performance-test.yml | 2 +- .../on-demand-vrfv2plus-eth2-clients-test.yml | 2 +- .../on-demand-vrfv2plus-performance-test.yml | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/automation-benchmark-tests.yml b/.github/workflows/automation-benchmark-tests.yml index 0b0404e0e07..c1a8d9edc9f 100644 --- a/.github/workflows/automation-benchmark-tests.yml +++ b/.github/workflows/automation-benchmark-tests.yml @@ -66,7 +66,7 @@ jobs: QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} suites: benchmark chaos reorg load - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 env: DETACH_RUNNER: true TEST_SUITE: benchmark diff --git a/.github/workflows/automation-load-tests.yml b/.github/workflows/automation-load-tests.yml index d3f0254446b..d56ee2e74c4 100644 --- a/.github/workflows/automation-load-tests.yml +++ b/.github/workflows/automation-load-tests.yml @@ -82,7 +82,7 @@ jobs: QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} suites: benchmark chaos reorg load - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 env: RR_CPU: 4000m RR_MEM: 4Gi diff --git a/.github/workflows/automation-nightly-tests.yml b/.github/workflows/automation-nightly-tests.yml index 183ead14477..39a6d907e61 100644 --- a/.github/workflows/automation-nightly-tests.yml +++ b/.github/workflows/automation-nightly-tests.yml @@ -114,7 +114,7 @@ jobs: grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" grafanaBearerToken: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 env: TEST_SUITE: ${{ matrix.tests.suite }} with: diff --git a/.github/workflows/automation-ondemand-tests.yml b/.github/workflows/automation-ondemand-tests.yml index 297f3532498..588bf567bc0 100644 --- a/.github/workflows/automation-ondemand-tests.yml +++ b/.github/workflows/automation-ondemand-tests.yml @@ -313,7 +313,7 @@ jobs: echo ::add-mask::$BASE64_CONFIG_OVERRIDE echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 if: ${{ matrix.tests.enabled == true }} env: TEST_SUITE: ${{ matrix.tests.suite }} diff --git a/.github/workflows/client-compatibility-tests.yml b/.github/workflows/client-compatibility-tests.yml index 6734a6738a7..d953a087d43 100644 --- a/.github/workflows/client-compatibility-tests.yml +++ b/.github/workflows/client-compatibility-tests.yml @@ -253,7 +253,7 @@ jobs: echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV touch .root_dir - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd ./integration-tests/smoke && go test -timeout ${{ matrix.timeout }} -count=1 -json -test.run ${{ matrix.test }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/evm-version-compatibility-tests.yml b/.github/workflows/evm-version-compatibility-tests.yml index a14d46cc790..6705ec79e7d 100644 --- a/.github/workflows/evm-version-compatibility-tests.yml +++ b/.github/workflows/evm-version-compatibility-tests.yml @@ -256,7 +256,7 @@ jobs: customEthClientDockerImage: ${{ matrix.evm_node.docker_image }} - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd ./integration-tests && go test -timeout 45m -count=1 -json -test.parallel=2 ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/integration-chaos-tests.yml b/.github/workflows/integration-chaos-tests.yml index 87075a63181..e276917f103 100644 --- a/.github/workflows/integration-chaos-tests.yml +++ b/.github/workflows/integration-chaos-tests.yml @@ -132,7 +132,7 @@ jobs: echo ::add-mask::$BASE64_CONFIG_OVERRIDE echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd integration-tests && go test -timeout 1h -count=1 -json -test.parallel 11 ./chaos 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 6b004b7c016..56d3a959871 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -352,7 +352,7 @@ jobs: ## Run this step when changes that require tests to be run are made - name: Run Tests if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -466,7 +466,7 @@ jobs: ## Run this step when changes that require tests to be run are made - name: Run Tests if: needs.changes.outputs.src == 'true' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -695,7 +695,7 @@ jobs: ## Run this step when changes that require tests to be run are made - name: Run Tests if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -730,7 +730,7 @@ jobs: # Run this step when changes that do not need the test to run are made - name: Run Setup if: needs.changes.outputs.src == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_download_vendor_packages_command: cd ./integration-tests && go mod download go_mod_path: ./integration-tests/go.mod @@ -936,7 +936,7 @@ jobs: grafanaUrl: ${{ vars.GRAFANA_URL }} grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - name: Run Migration Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd ./integration-tests && go test -timeout 20m -count=1 -json ./migration 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -1195,7 +1195,7 @@ jobs: ref: ${{ needs.get_solana_sha.outputs.sha }} - name: Run Setup if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: go_mod_path: ./integration-tests/go.mod cache_restore_only: true @@ -1247,7 +1247,7 @@ jobs: echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV - name: Run Tests if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: export ENV_JOB_IMAGE=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ needs.get_solana_sha.outputs.sha }} && make test_smoke cl_repo: ${{ env.CHAINLINK_IMAGE }} diff --git a/.github/workflows/on-demand-keeper-smoke-tests.yml b/.github/workflows/on-demand-keeper-smoke-tests.yml index 452c8478d00..f6fa8f4467a 100644 --- a/.github/workflows/on-demand-keeper-smoke-tests.yml +++ b/.github/workflows/on-demand-keeper-smoke-tests.yml @@ -151,7 +151,7 @@ jobs: ## Run this step when changes that require tests to be run are made - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/on-demand-ocr-soak-test.yml b/.github/workflows/on-demand-ocr-soak-test.yml index 9c29c021b8a..aacd07b7de7 100644 --- a/.github/workflows/on-demand-ocr-soak-test.yml +++ b/.github/workflows/on-demand-ocr-soak-test.yml @@ -73,7 +73,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 env: DETACH_RUNNER: true TEST_SUITE: soak diff --git a/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml b/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml index beed388e3f6..03b07ab1b1b 100644 --- a/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml +++ b/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml @@ -46,7 +46,7 @@ jobs: echo "### Execution client used" >>$GITHUB_STEP_SUMMARY echo "\`${{ env.ETH2_EL_CLIENT }}\`" >>$GITHUB_STEP_SUMMARY - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -run TestVRFv2Basic ./smoke/vrfv2_test.go 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/on-demand-vrfv2-performance-test.yml b/.github/workflows/on-demand-vrfv2-performance-test.yml index 79711a107b0..43899b4e577 100644 --- a/.github/workflows/on-demand-vrfv2-performance-test.yml +++ b/.github/workflows/on-demand-vrfv2-performance-test.yml @@ -76,7 +76,7 @@ jobs: echo "### Networks on which test was run" >>$GITHUB_STEP_SUMMARY echo "\`${{ env.NETWORKS }}\`" >>$GITHUB_STEP_SUMMARY - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd ./integration-tests/load && go test -v -count=1 -timeout 24h -run "${{ inputs.test_list_regex }}" ./vrfv2 test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml b/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml index c2469d488d1..242eed23640 100644 --- a/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml +++ b/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml @@ -46,7 +46,7 @@ jobs: echo "### Execution client used" >>$GITHUB_STEP_SUMMARY echo "\`${{ env.ETH2_EL_CLIENT }}\`" >>$GITHUB_STEP_SUMMARY - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -run ^TestVRFv2Plus$/^Link_Billing$ ./smoke/vrfv2plus_test.go 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/on-demand-vrfv2plus-performance-test.yml b/.github/workflows/on-demand-vrfv2plus-performance-test.yml index 2ee3256b53a..fa915381d1c 100644 --- a/.github/workflows/on-demand-vrfv2plus-performance-test.yml +++ b/.github/workflows/on-demand-vrfv2plus-performance-test.yml @@ -76,7 +76,7 @@ jobs: echo "### Networks on which test was run" >>$GITHUB_STEP_SUMMARY echo "\`${{ env.NETWORKS }}\`" >>$GITHUB_STEP_SUMMARY - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 with: test_command_to_run: cd ./integration-tests/load && go test -v -count=1 -timeout 24h -run "${{ inputs.test_list_regex }}" ./vrfv2plus test_download_vendor_packages_command: cd ./integration-tests && go mod download From ce08fc3c4172f4d9f5a480ec3339b2a044dc5d9d Mon Sep 17 00:00:00 2001 From: Awbrey Hughlett Date: Mon, 17 Jun 2024 17:47:09 -0500 Subject: [PATCH 11/14] Define and implement QueryKey Cursors (#13385) * Define and implement QueryKey Cursors Cursors in the EVM implementation of QueryKey are constructed to match the current default sorting in LogPoller using block number and log index. Using both of these pieces of data together uniquely identifies a log within the LogPoller database. * add tx hash to SQL query * modify cursor query for accurate block and log querying --- core/chains/evm/logpoller/parser.go | 57 +++++++++++++++++------- core/chains/evm/logpoller/parser_test.go | 28 ++++++------ 2 files changed, 55 insertions(+), 30 deletions(-) diff --git a/core/chains/evm/logpoller/parser.go b/core/chains/evm/logpoller/parser.go index 2e17c92ed60..3860fb2ff12 100644 --- a/core/chains/evm/logpoller/parser.go +++ b/core/chains/evm/logpoller/parser.go @@ -249,11 +249,15 @@ func (v *pgDSLParser) whereClause(expressions []query.Expression, limiter query. segment := "WHERE evm_chain_id = :evm_chain_id" if len(expressions) > 0 { - exp, err := v.combineExpressions(expressions, query.AND) + exp, hasFinalized, err := v.combineExpressions(expressions, query.AND) if err != nil { return "", err } + if limiter.HasCursorLimit() && !hasFinalized { + return "", errors.New("cursor-base queries limited to only finalized blocks") + } + segment = fmt.Sprintf("%s AND %s", segment, exp) } @@ -268,15 +272,14 @@ func (v *pgDSLParser) whereClause(expressions []query.Expression, limiter query. return "", errors.New("invalid cursor direction") } - block, txHash, logIdx, err := valuesFromCursor(limiter.Limit.Cursor) + block, logIdx, _, err := valuesFromCursor(limiter.Limit.Cursor) if err != nil { return "", err } - segment = fmt.Sprintf("%s AND block_number %s= :cursor_block AND tx_hash %s= :cursor_txhash AND log_index %s :cursor_log_index", segment, op, op, op) + segment = fmt.Sprintf("%s AND (block_number %s :cursor_block_number OR (block_number = :cursor_block_number AND log_index %s :cursor_log_index))", segment, op, op) v.args.withField("cursor_block_number", block). - withField("cursor_txhash", common.HexToHash(txHash)). withField("cursor_log_index", logIdx) } @@ -319,7 +322,7 @@ func (v *pgDSLParser) orderClause(limiter query.LimitAndSort) (string, error) { case query.SortByBlock: name = blockFieldName case query.SortBySequence: - sort[idx] = fmt.Sprintf("block_number %s, tx_hash %s, log_index %s", order, order, order) + sort[idx] = fmt.Sprintf("block_number %s, log_index %s, tx_hash %s", order, order, order) continue case query.SortByTimestamp: @@ -352,24 +355,37 @@ func (v *pgDSLParser) getLastExpression() (string, error) { return exp, err } -func (v *pgDSLParser) combineExpressions(expressions []query.Expression, op query.BoolOperator) (string, error) { +func (v *pgDSLParser) combineExpressions(expressions []query.Expression, op query.BoolOperator) (string, bool, error) { grouped := len(expressions) > 1 clauses := make([]string, len(expressions)) + var isFinalized bool + for idx, exp := range expressions { if exp.IsPrimitive() { exp.Primitive.Accept(v) + switch prim := exp.Primitive.(type) { + case *primitives.Confidence: + isFinalized = prim.ConfidenceLevel == primitives.Finalized + case *confirmationsFilter: + isFinalized = prim.Confirmations == evmtypes.Finalized + } + clause, err := v.getLastExpression() if err != nil { - return "", err + return "", isFinalized, err } clauses[idx] = clause } else { - clause, err := v.combineExpressions(exp.BoolExpression.Expressions, exp.BoolExpression.BoolOperator) + clause, fin, err := v.combineExpressions(exp.BoolExpression.Expressions, exp.BoolExpression.BoolOperator) if err != nil { - return "", err + return "", isFinalized, err + } + + if fin { + isFinalized = fin } clauses[idx] = clause @@ -382,7 +398,7 @@ func (v *pgDSLParser) combineExpressions(expressions []query.Expression, op quer output = fmt.Sprintf("(%s)", output) } - return output, nil + return output, isFinalized, nil } func cmpOpToString(op primitives.ComparisonOperator) (string, error) { @@ -415,23 +431,30 @@ func orderToString(dir query.SortDirection) (string, error) { } } -func valuesFromCursor(cursor string) (int64, string, int, error) { +func valuesFromCursor(cursor string) (int64, int, []byte, error) { + partCount := 3 + parts := strings.Split(cursor, "-") - if len(parts) != 3 { - return 0, "", 0, fmt.Errorf("%w: must be composed as block-txhash-logindex", ErrUnexpectedCursorFormat) + if len(parts) != partCount { + return 0, 0, nil, fmt.Errorf("%w: must be composed as block-logindex-txHash", ErrUnexpectedCursorFormat) } block, err := strconv.ParseInt(parts[0], 10, 64) if err != nil { - return 0, "", 0, fmt.Errorf("%w: block number not parsable as int64", ErrUnexpectedCursorFormat) + return 0, 0, nil, fmt.Errorf("%w: block number not parsable as int64", ErrUnexpectedCursorFormat) + } + + logIdx, err := strconv.ParseInt(parts[1], 10, 32) + if err != nil { + return 0, 0, nil, fmt.Errorf("%w: log index not parsable as int", ErrUnexpectedCursorFormat) } - logIdx, err := strconv.ParseInt(parts[2], 10, 32) + txHash, err := hexutil.Decode(parts[2]) if err != nil { - return 0, "", 0, fmt.Errorf("%w: log index not parsable as int", ErrUnexpectedCursorFormat) + return 0, 0, nil, fmt.Errorf("%w: invalid transaction hash: %s", ErrUnexpectedCursorFormat, err.Error()) } - return block, parts[1], int(logIdx), nil + return block, int(logIdx), txHash, nil } type addressFilter struct { diff --git a/core/chains/evm/logpoller/parser_test.go b/core/chains/evm/logpoller/parser_test.go index 521aec14d8c..a12455ea5dd 100644 --- a/core/chains/evm/logpoller/parser_test.go +++ b/core/chains/evm/logpoller/parser_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/query" "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) func assertArgs(t *testing.T, args *queryArgs, numVals int) { @@ -46,22 +47,25 @@ func TestDSLParser(t *testing.T) { expressions := []query.Expression{ NewAddressFilter(common.HexToAddress("0x42")), NewEventSigFilter(common.HexToHash("0x21")), + NewConfirmationsFilter(types.Finalized), } - limiter := query.NewLimitAndSort(query.CursorLimit("10-0x42-5", query.CursorFollowing, 20)) + limiter := query.NewLimitAndSort(query.CursorLimit("10-5-0x42", query.CursorFollowing, 20)) result, args, err := parser.buildQuery(chainID, expressions, limiter) expected := "SELECT evm.logs.* " + "FROM evm.logs " + "WHERE evm_chain_id = :evm_chain_id " + - "AND (address = :address_0 AND event_sig = :event_sig_0) " + - "AND block_number >= :cursor_block AND tx_hash >= :cursor_txhash AND log_index > :cursor_log_index " + - "ORDER BY block_number ASC, tx_hash ASC, log_index ASC " + + "AND (address = :address_0 AND event_sig = :event_sig_0 " + + "AND block_number <= " + + "(SELECT finalized_block_number FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1)) " + + "AND (block_number > :cursor_block_number OR (block_number = :cursor_block_number AND log_index > :cursor_log_index)) " + + "ORDER BY block_number ASC, log_index ASC, tx_hash ASC " + "LIMIT 20" require.NoError(t, err) assert.Equal(t, expected, result) - assertArgs(t, args, 6) + assertArgs(t, args, 5) }) t.Run("query with limit and no order by", func(t *testing.T) { @@ -100,7 +104,7 @@ func TestDSLParser(t *testing.T) { expected := "SELECT evm.logs.* " + "FROM evm.logs " + "WHERE evm_chain_id = :evm_chain_id " + - "ORDER BY block_number DESC, tx_hash DESC, log_index DESC" + "ORDER BY block_number DESC, log_index DESC, tx_hash DESC" require.NoError(t, err) assert.Equal(t, expected, result) @@ -138,9 +142,8 @@ func TestDSLParser(t *testing.T) { query.TxHash(common.HexToHash("0x84").String()), query.Block(99, primitives.Neq), query.Confidence(primitives.Finalized), - query.Confidence(primitives.Unconfirmed), } - limiter := query.NewLimitAndSort(query.CursorLimit("10-0x42-20", query.CursorPrevious, 20)) + limiter := query.NewLimitAndSort(query.CursorLimit("10-20-0x42", query.CursorPrevious, 20)) result, args, err := parser.buildQuery(chainID, expressions, limiter) expected := "SELECT evm.logs.* " + @@ -150,15 +153,14 @@ func TestDSLParser(t *testing.T) { "AND tx_hash = :tx_hash_0 " + "AND block_number != :block_number_0 " + "AND block_number <= " + - "(SELECT finalized_block_number FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1) " + - "AND block_number <= (SELECT greatest(block_number - :confs_0, 0) FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1)) " + - "AND block_number <= :cursor_block AND tx_hash <= :cursor_txhash AND log_index < :cursor_log_index " + - "ORDER BY block_number DESC, tx_hash DESC, log_index DESC LIMIT 20" + "(SELECT finalized_block_number FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1)) " + + "AND (block_number < :cursor_block_number OR (block_number = :cursor_block_number AND log_index < :cursor_log_index)) " + + "ORDER BY block_number DESC, log_index DESC, tx_hash DESC LIMIT 20" require.NoError(t, err) assert.Equal(t, expected, result) - assertArgs(t, args, 8) + assertArgs(t, args, 6) }) t.Run("query for finality", func(t *testing.T) { From a899925e19107721f9183f04ed9d598d8c0486c0 Mon Sep 17 00:00:00 2001 From: Lukasz <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:25:14 +0200 Subject: [PATCH 12/14] TT-1154 Add new OCR soak tests with gas simulations (#13576) * Add TestOCRSoak_GasSpike test * Refactor reorg start logic * Start gas spike simulation after 1 min since test is 15 min long * Add makefile * Update CTF * Add TestOCRSoak_ChangeBlockGasLimit test * Bump CTF --- integration-tests/Makefile | 10 ++ integration-tests/go.mod | 3 +- integration-tests/go.sum | 4 +- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 +- integration-tests/soak/ocr_test.go | 13 +++ integration-tests/testconfig/ocr/ocr.toml | 38 +++++++- integration-tests/testsetups/ocr.go | 109 ++++++++++++++++++---- 8 files changed, 155 insertions(+), 28 deletions(-) diff --git a/integration-tests/Makefile b/integration-tests/Makefile index af3307dd395..5b3b3a2aae2 100644 --- a/integration-tests/Makefile +++ b/integration-tests/Makefile @@ -158,6 +158,16 @@ test_soak_ocr_reorg_2: . ./scripts/check_base64_env_var.sh go test -v -count=1 -run ^TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled$$ ./soak +.PHONY: test_soak_ocr_gas_spike +test_soak_ocr_gas_spike: + . ./scripts/check_base64_env_var.sh + go test -v -count=1 -run ^TestOCRSoak_GasSpike$$ ./soak + +.PHONY: test_soak_ocr_gas_limit_change +test_soak_ocr_gas_limit_change: + . ./scripts/check_base64_env_var.sh + go test -v -count=1 -run ^TestOCRSoak_ChangeBlockGasLimit$$ ./soak + .PHONY: test_soak_forwarder_ocr test_soak_forwarder_ocr: . ./scripts/check_base64_env_var.sh diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 1265e54dc16..c3257029ace 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -28,7 +28,7 @@ require ( github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af - github.com/smartcontractkit/chainlink-testing-framework v1.30.4 + github.com/smartcontractkit/chainlink-testing-framework v1.30.9 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c @@ -50,7 +50,6 @@ require ( exclude github.com/hashicorp/consul v1.2.1 replace ( - // Pin K8s versions as their updates are highly disruptive and go mod keeps wanting to update them k8s.io/api => k8s.io/api v0.25.11 k8s.io/client-go => k8s.io/client-go v0.25.11 k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d diff --git a/integration-tests/go.sum b/integration-tests/go.sum index fc0614fdb9e..c7792ef3193 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1524,8 +1524,8 @@ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 h1:h1E87+z+JcUEfvbJVF56SnZA/YUFE5ewUE61MaR/Ewg= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= -github.com/smartcontractkit/chainlink-testing-framework v1.30.4 h1:kf6zRL6v5D047gynYNNqXGl9QBvnQSa4LMs1iHLRu64= -github.com/smartcontractkit/chainlink-testing-framework v1.30.4/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= +github.com/smartcontractkit/chainlink-testing-framework v1.30.9 h1:U8TqnPn2pfe+jSojeZL58sXBgfHFBHRsnm3izLthaYw= +github.com/smartcontractkit/chainlink-testing-framework v1.30.9/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449 h1:fX/xmGm1GBsD1ZZnooNT+eWA0hiTAqFlHzOC5CY4dy8= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 1f102b9cc2c..6858bcc7fd9 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -17,7 +17,7 @@ require ( github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af - github.com/smartcontractkit/chainlink-testing-framework v1.30.4 + github.com/smartcontractkit/chainlink-testing-framework v1.30.9 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240214231432-4ad5eb95178c github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240216210048-da02459ddad8 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 3522cd16d2e..f27109b799e 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1514,8 +1514,8 @@ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 h1:h1E87+z+JcUEfvbJVF56SnZA/YUFE5ewUE61MaR/Ewg= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= -github.com/smartcontractkit/chainlink-testing-framework v1.30.4 h1:kf6zRL6v5D047gynYNNqXGl9QBvnQSa4LMs1iHLRu64= -github.com/smartcontractkit/chainlink-testing-framework v1.30.4/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= +github.com/smartcontractkit/chainlink-testing-framework v1.30.9 h1:U8TqnPn2pfe+jSojeZL58sXBgfHFBHRsnm3izLthaYw= +github.com/smartcontractkit/chainlink-testing-framework v1.30.9/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449 h1:fX/xmGm1GBsD1ZZnooNT+eWA0hiTAqFlHzOC5CY4dy8= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= diff --git a/integration-tests/soak/ocr_test.go b/integration-tests/soak/ocr_test.go index f8120d2ae0f..789c7de8e3b 100644 --- a/integration-tests/soak/ocr_test.go +++ b/integration-tests/soak/ocr_test.go @@ -37,6 +37,19 @@ func TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled(t *testing.T) { runOCRSoakTest(t, config, "") } +func TestOCRSoak_GasSpike(t *testing.T) { + config, err := tc.GetConfig(t.Name(), tc.OCR) + require.NoError(t, err, "Error getting config") + runOCRSoakTest(t, config, "") +} + +// TestOCRSoak_ChangeBlockGasLimit changes next block gas limit and sets it to percentage of last gasUsed in previous block creating congestion +func TestOCRSoak_ChangeBlockGasLimit(t *testing.T) { + config, err := tc.GetConfig(t.Name(), tc.OCR) + require.NoError(t, err, "Error getting config") + runOCRSoakTest(t, config, "") +} + func runOCRSoakTest(t *testing.T, config tc.TestConfig, customNetworkTOML string) { l := logging.GetTestLogger(t) diff --git a/integration-tests/testconfig/ocr/ocr.toml b/integration-tests/testconfig/ocr/ocr.toml index 30fc9655bf9..6c5745807b4 100644 --- a/integration-tests/testconfig/ocr/ocr.toml +++ b/integration-tests/testconfig/ocr/ocr.toml @@ -135,4 +135,40 @@ test_duration="15m" [TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled.OCR.Soak] ocr_version="1" number_of_contracts=2 -time_between_rounds="1m" \ No newline at end of file +time_between_rounds="1m" + +# OCR soak test configuration with gas spike on Anvil network +[TestOCRSoak_GasSpike.Common] +chainlink_node_funding = 100 +[TestOCRSoak_GasSpike.OCR.Common] +test_duration="15m" +[TestOCRSoak_GasSpike.OCR.Soak] +ocr_version="1" +number_of_contracts=2 +time_between_rounds="1m" +[TestOCRSoak_GasSpike.Network] +selected_networks=["Anvil"] +[TestOCRSoak_GasSpike.Network.AnvilConfigs.anvil.GasSpikeSimulation] +enabled = true +start_gas_price = 2000000000 +gas_rise_percentage = 0.7 +gas_spike = true +delay_create = "1m" +duration = "3m" + +# OCR soak test configuration with change to gas limit on Anvil network +[TestOCRSoak_ChangeBlockGasLimit.Common] +chainlink_node_funding = 100 +[TestOCRSoak_ChangeBlockGasLimit.OCR.Common] +test_duration="15m" +[TestOCRSoak_ChangeBlockGasLimit.OCR.Soak] +ocr_version="1" +number_of_contracts=2 +time_between_rounds="1m" +[TestOCRSoak_ChangeBlockGasLimit.Network] +selected_networks=["Anvil"] +[TestOCRSoak_ChangeBlockGasLimit.Network.AnvilConfigs.anvil.GasLimitSimulation] +enabled = true +next_gas_limit_percentage = 0.5 +delay_create = "1m" +duration = "3m" \ No newline at end of file diff --git a/integration-tests/testsetups/ocr.go b/integration-tests/testsetups/ocr.go index 02f4db9c51b..fcff17874ec 100644 --- a/integration-tests/testsetups/ocr.go +++ b/integration-tests/testsetups/ocr.go @@ -83,8 +83,10 @@ type OCRSoakTest struct { ocrV2Instances []contracts.OffchainAggregatorV2 ocrV2InstanceMap map[string]contracts.OffchainAggregatorV2 // address : instance - rpcNetwork blockchain.EVMNetwork // network configuration for the blockchain node - reorgHappened bool // flag to indicate if a reorg happened during the test + rpcNetwork blockchain.EVMNetwork // network configuration for the blockchain node + reorgHappened bool // flag to indicate if a reorg happened during the test + gasSpikeSimulationHappened bool // flag to indicate if a gas spike simulation happened during the test + gasLimitSimulationHappened bool // flag to indicate if a gas limit simulation happened during the test } // NewOCRSoakTest creates a new OCR soak test to setup and run @@ -208,6 +210,7 @@ func (o *OCRSoakTest) DeployEnvironment(customChainlinkNetworkTOML string, ocrTe } else { // Test is running locally, set forwarded URL of Anvil blockchain node o.rpcNetwork.URLs = []string{anvilChart.ForwardedWSURL} + o.rpcNetwork.HTTPURLs = []string{anvilChart.ForwardedHTTPURL} } } else if o.rpcNetwork.Simulated && o.rpcNetwork.Name == blockchain.SimulatedEVMNetwork.Name { if testEnv.Cfg.InsideK8s { @@ -585,10 +588,10 @@ func (o *OCRSoakTest) testLoop(testDuration time.Duration, newValue int) { err := o.observeOCREvents() require.NoError(o.t, err, "Error subscribing to OCR events") + n := o.Config.GetNetworkConfig() + // Schedule blockchain re-org if needed // Reorg only avaible for Simulated Geth - var reorgCh <-chan time.Time - n := o.Config.GetNetworkConfig() if n.IsSimulatedGethSelected() && n.GethReorgConfig.Enabled { var reorgDelay time.Duration if n.GethReorgConfig.DelayCreate.Duration > testDuration { @@ -598,7 +601,47 @@ func (o *OCRSoakTest) testLoop(testDuration time.Duration, newValue int) { } else { reorgDelay = n.GethReorgConfig.DelayCreate.Duration } - reorgCh = time.After(reorgDelay) + time.AfterFunc(reorgDelay, func() { + if !o.reorgHappened { + o.startGethBlockchainReorg(o.rpcNetwork, n.GethReorgConfig) + } + }) + } + + // Schedule gas simulations if needed + // Gas simulation only available for Anvil + if o.rpcNetwork.Name == "Anvil" { + ac := o.Config.GetNetworkConfig().AnvilConfigs["ANVIL"] + if ac != nil && ac.GasSpikeSimulation.Enabled { + var delay time.Duration + if ac.GasSpikeSimulation.DelayCreate.Duration > testDuration { + // This may happen when test is resumed and the reorg delay is longer than the time left + o.log.Warn().Msg("Gas spike simulation delay is longer than test duration, gas simulation scheduled immediately") + delay = 0 + } else { + delay = ac.GasSpikeSimulation.DelayCreate.Duration + } + time.AfterFunc(delay, func() { + if !o.gasSpikeSimulationHappened { + o.startAnvilGasSpikeSimulation(o.rpcNetwork, ac.GasSpikeSimulation) + } + }) + } + if ac != nil && ac.GasLimitSimulation.Enabled { + var delay time.Duration + if ac.GasLimitSimulation.DelayCreate.Duration > testDuration { + // This may happen when test is resumed and the reorg delay is longer than the time left + o.log.Warn().Msg("Gas limit simulation delay is longer than test duration, gas simulation scheduled immediately") + delay = 0 + } else { + delay = ac.GasLimitSimulation.DelayCreate.Duration + } + time.AfterFunc(delay, func() { + if !o.gasLimitSimulationHappened { + o.startAnvilGasLimitSimulation(o.rpcNetwork, ac.GasLimitSimulation) + } + }) + } } for { @@ -634,12 +677,6 @@ func (o *OCRSoakTest) testLoop(testDuration time.Duration, newValue int) { newValue = rand.Intn(256) + 1 // #nosec G404 - kudos to you if you actually find a way to exploit this } lastValue = newValue - - // Schedule blockchain re-org if needed - case <-reorgCh: - if !o.reorgHappened { - o.startBlockchainReorg(o.Config.GetNetworkConfig().GethReorgConfig.Depth) - } } } } @@ -655,22 +692,54 @@ func (o *OCRSoakTest) complete() { o.TestReporter.RecordEvents(o.ocrRoundStates, o.testIssues) } -func (o *OCRSoakTest) startBlockchainReorg(depth int) { - if !o.Config.GetNetworkConfig().IsSimulatedGethSelected() { - require.FailNow(o.t, "Reorg only available for Simulated Geth") - return - } - - client := ctf_client.NewRPCClient(o.rpcNetwork.HTTPURLs[0]) +func (o *OCRSoakTest) startGethBlockchainReorg(network blockchain.EVMNetwork, conf ctf_config.ReorgConfig) { + client := ctf_client.NewRPCClient(network.HTTPURLs[0]) o.log.Info(). Str("URL", client.URL). - Int("depth", depth). + Int("Depth", conf.Depth). Msg("Starting blockchain reorg on Simulated Geth chain") - err := client.GethSetHead(depth) + err := client.GethSetHead(conf.Depth) require.NoError(o.t, err, "Error starting blockchain reorg on Simulated Geth chain") o.reorgHappened = true } +func (o *OCRSoakTest) startAnvilGasSpikeSimulation(network blockchain.EVMNetwork, conf ctf_config.GasSpikeSimulationConfig) { + client := ctf_client.NewRPCClient(network.HTTPURLs[0]) + o.log.Info(). + Str("URL", client.URL). + Any("GasSpikeSimulationConfig", conf). + Msg("Starting gas spike simulation on Anvil chain") + err := client.ModulateBaseFeeOverDuration(o.log, conf.StartGasPrice, conf.GasRisePercentage, conf.Duration.Duration, conf.GasSpike) + require.NoError(o.t, err, "Error starting gas simulation on Anvil chain") + o.gasSpikeSimulationHappened = true +} + +func (o *OCRSoakTest) startAnvilGasLimitSimulation(network blockchain.EVMNetwork, conf ctf_config.GasLimitSimulationConfig) { + client := ctf_client.NewRPCClient(network.HTTPURLs[0]) + latestBlock, err := o.seth.Client.BlockByNumber(context.Background(), nil) + require.NoError(o.t, err) + newGasLimit := int64(math.Ceil(float64(latestBlock.GasUsed()) * conf.NextGasLimitPercentage)) + o.log.Info(). + Str("URL", client.URL). + Any("GasLimitSimulationConfig", conf). + Uint64("LatestBlock", latestBlock.Number().Uint64()). + Uint64("LatestGasUsed", latestBlock.GasUsed()). + Uint64("LatestGasLimit", latestBlock.GasLimit()). + Int64("NewGasLimit", newGasLimit). + Msg("Starting new gas limit simulation on Anvil chain") + err = client.AnvilSetBlockGasLimit([]interface{}{newGasLimit}) + require.NoError(o.t, err, "Error starting gas simulation on Anvil chain") + time.Sleep(conf.Duration.Duration) + o.log.Info(). + Str("URL", client.URL). + Any("GasLimitSimulationConfig", conf). + Uint64("LatestGasLimit", latestBlock.GasLimit()). + Msg("Returning to old gas limit simulation on Anvil chain") + err = client.AnvilSetBlockGasLimit([]interface{}{latestBlock.GasLimit()}) + require.NoError(o.t, err, "Error starting gas simulation on Anvil chain") + o.gasLimitSimulationHappened = true +} + // setFilterQuery to look for all events that happened func (o *OCRSoakTest) setFilterQuery() { ocrAddresses := o.getContractAddresses() From f5a70eb09abc9a4d859442c9bd062a74a7ec9c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deividas=20Kar=C5=BEinauskas?= Date: Tue, 18 Jun 2024 13:04:19 +0300 Subject: [PATCH 13/14] [KS-344] Capability Registry: Polish (#13569) * Validate that capabilities required by a Workflow DON are still supported * Validate that capabilities required by a capabilities DONs are still supported * --wip-- [skip CI] * Create and return CapabilityInfo from getters * Fix reader and syncer tests * Changesets --- .changeset/metal-glasses-count.md | 5 + contracts/.changeset/two-doors-dance.md | 5 + contracts/gas-snapshots/keystone.gas-snapshot | 59 ++++----- .../v0.8/keystone/CapabilitiesRegistry.sol | 122 ++++++++++++------ ...bilitiesRegistry_AddCapabilitiesTest.t.sol | 8 +- ...bilitiesRegistry_GetCapabilitiesTest.t.sol | 49 ++----- ...CapabilitiesRegistry_UpdateNodesTest.t.sol | 80 ++++++++++++ core/capabilities/reader.go | 10 +- core/capabilities/reader_test.go | 9 +- core/capabilities/syncer.go | 4 +- core/capabilities/syncer_test.go | 8 +- .../capabilities_registry.go | 55 ++++---- ...rapper-dependency-versions-do-not-edit.txt | 2 +- 13 files changed, 270 insertions(+), 146 deletions(-) create mode 100644 .changeset/metal-glasses-count.md create mode 100644 contracts/.changeset/two-doors-dance.md diff --git a/.changeset/metal-glasses-count.md b/.changeset/metal-glasses-count.md new file mode 100644 index 00000000000..0408383bd03 --- /dev/null +++ b/.changeset/metal-glasses-count.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal diff --git a/contracts/.changeset/two-doors-dance.md b/contracts/.changeset/two-doors-dance.md new file mode 100644 index 00000000000..93fba83b558 --- /dev/null +++ b/contracts/.changeset/two-doors-dance.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +#internal diff --git a/contracts/gas-snapshots/keystone.gas-snapshot b/contracts/gas-snapshots/keystone.gas-snapshot index 55e6884c818..1aa0c02e3f3 100644 --- a/contracts/gas-snapshots/keystone.gas-snapshot +++ b/contracts/gas-snapshots/keystone.gas-snapshot @@ -1,5 +1,5 @@ -CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 152156) -CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 176137) +CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 154898) +CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 178879) CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 24723) CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 145769) CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 94606) @@ -7,7 +7,7 @@ CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNo CapabilitiesRegistry_AddDONTest:test_AddDON() (gas: 372909) CapabilitiesRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19269) CapabilitiesRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 169874) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 243042) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 239974) CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 249901) CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 116949) CapabilitiesRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43354) @@ -16,41 +16,40 @@ CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() ( CapabilitiesRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 184333) CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17602) CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 18498) -CapabilitiesRegistry_AddNodesTest:test_AddsNodeParams() (gas: 358667) -CapabilitiesRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 358633) +CapabilitiesRegistry_AddNodesTest:test_AddsNodeParams() (gas: 358630) +CapabilitiesRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 358596) CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301350) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55207) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55174) CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24895) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27702) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27669) CapabilitiesRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25108) CapabilitiesRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27408) CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27047) CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309800) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 92938) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 93066) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 89870) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 89998) CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 22944) CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 16231) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 94395) -CapabilitiesRegistry_GetCapabilitiesTest:test_ExcludesDeprecatedCapabilities() (gas: 122114) -CapabilitiesRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 58311) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 91327) +CapabilitiesRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 135740) CapabilitiesRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65746) CapabilitiesRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 65329) CapabilitiesRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 11428) CapabilitiesRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 13087) CapabilitiesRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 36653) CapabilitiesRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 38938) -CapabilitiesRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 65482) -CapabilitiesRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73664) +CapabilitiesRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 65408) +CapabilitiesRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73634) CapabilitiesRegistry_RemoveDONsTest:test_RemovesDON() (gas: 54946) CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15647) CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16550) CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 36122) CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15816) -CapabilitiesRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 115436) -CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 288312) -CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 562061) -CapabilitiesRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 73457) -CapabilitiesRegistry_RemoveNodesTest:test_RemovesNode() (gas: 75292) +CapabilitiesRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 115399) +CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 288275) +CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 562024) +CapabilitiesRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 73428) +CapabilitiesRegistry_RemoveNodesTest:test_RemovesNode() (gas: 75262) CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25053) CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18418) CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfCapabilitiesDON() (gas: 385680) @@ -59,7 +58,7 @@ CapabilitiesRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 9796) CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19411) CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 153162) CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17831) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 226375) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 223307) CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 233235) CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 107828) CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 163668) @@ -69,16 +68,18 @@ CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZ CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 19786) CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 15426) CapabilitiesRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 36991) -CapabilitiesRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 253325) -CapabilitiesRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 161746) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35794) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25064) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27303) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29214) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27291) +CapabilitiesRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 256393) +CapabilitiesRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 162174) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35766) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25069) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27308) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29219) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27296) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByCapabilityDON() (gas: 471181) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByWorkflowDON() (gas: 341462) CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 26951) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25508) -CapabilitiesRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 161800) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25480) +CapabilitiesRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 162228) KeystoneForwarder_ReportTest:test_Report_ConfigVersion() (gas: 1802140) KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverInterfaceNotSupported() (gas: 126020) KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverNotContract() (gas: 127513) diff --git a/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol b/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol index 9286dd678b1..ff68b292836 100644 --- a/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol +++ b/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol @@ -128,8 +128,41 @@ contract CapabilitiesRegistry is OwnerIsCreator, TypeAndVersionInterface { /// /// Ex. id = "data-streams-reports:chain:ethereum@1.0.0" /// labelledName = "data-streams-reports:chain:ethereum" + string labelledName; + /// @notice Semver, e.g., "1.2.3" + /// @dev must be valid Semver + max 32 characters. + string version; + /// @notice CapabilityType indicates the type of capability which determines + /// where the capability can be used in a Workflow Spec. + CapabilityType capabilityType; + /// @notice CapabilityResponseType indicates whether remote response requires + // aggregation or is an already aggregated report. There are multiple + // possible ways to aggregate. + CapabilityResponseType responseType; + /// @notice An address to the capability configuration contract. Having this defined + // on a capability enforces consistent configuration across DON instances + // serving the same capability. Configuration contract MUST implement + // CapabilityConfigurationContractInterface. + // + /// @dev The main use cases are: + // 1) Sharing capability configuration across DON instances + // 2) Inspect and modify on-chain configuration without off-chain + // capability code. + // + // It is not recommended to store configuration which requires knowledge of + // the DON membership. + address configurationContract; + } + + struct CapabilityInfo { + /// @notice A hashed ID created by the `getHashedCapabilityId` function. + bytes32 hashedId; + /// @notice The partially qualified ID for the capability. + /// @dev Given the following capability ID: {name}:{label1_key}_{label1_value}:{label2_key}_{label2_value}@{version} + // Then we denote the `labelledName` as the `{name}:{label1_key}_{label1_value}:{label2_key}_{label2_value}` portion of the ID. /// - /// validation regex: ^[a-z0-9_\-:]{1,32}$ + /// Ex. id = "data-streams-reports:chain:ethereum@1.0.0" + /// labelledName = "data-streams-reports:chain:ethereum" string labelledName; /// @notice Semver, e.g., "1.2.3" /// @dev must be valid Semver + max 32 characters. @@ -154,6 +187,8 @@ contract CapabilitiesRegistry is OwnerIsCreator, TypeAndVersionInterface { // It is not recommended to store configuration which requires knowledge of // the DON membership. address configurationContract; + /// @notice True if the capability is deprecated + bool isDeprecated; } /// @notice CapabilityConfiguration is a struct that holds the capability configuration @@ -328,6 +363,13 @@ contract CapabilitiesRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @param nodeP2PId The P2P Id of the node error NodePartOfWorkflowDON(uint32 donId, bytes32 nodeP2PId); + /// @notice This error is thrown when removing a capability from the node + /// when that capability is still required by one of the DONs the node + /// belongs to. + /// @param hashedCapabilityId The hashed ID of the capability + /// @param donId The ID of the DON that requires the capability + error CapabilityRequiredByDON(bytes32 hashedCapabilityId, uint32 donId); + /// @notice This error is thrown when trying to add a capability with a /// configuration contract that does not implement the required interface. /// @param proposedConfigurationContract The address of the proposed @@ -390,8 +432,6 @@ contract CapabilitiesRegistry is OwnerIsCreator, TypeAndVersionInterface { /// @notice Set of deprecated hashed capability IDs, /// A hashed ID is created by the function `getHashedCapabilityId`. - /// - /// Deprecated capabilities are skipped by the `getCapabilities` function. EnumerableSet.Bytes32Set private s_deprecatedHashedCapabilityIds; /// @notice Encoded node signer addresses @@ -571,13 +611,11 @@ contract CapabilitiesRegistry is OwnerIsCreator, TypeAndVersionInterface { bool isOwner = msg.sender == owner(); for (uint256 i; i < nodes.length; ++i) { NodeParams memory node = nodes[i]; - NodeOperator memory nodeOperator = s_nodeOperators[node.nodeOperatorId]; if (!isOwner && msg.sender != nodeOperator.admin) revert AccessForbidden(msg.sender); Node storage storedNode = s_nodes[node.p2pId]; if (storedNode.signer == bytes32("")) revert NodeDoesNotExist(node.p2pId); - if (node.signer == bytes32("")) revert InvalidNodeSigner(); bytes32 previousSigner = storedNode.signer; @@ -598,6 +636,31 @@ contract CapabilitiesRegistry is OwnerIsCreator, TypeAndVersionInterface { storedNode.supportedHashedCapabilityIds[capabilityConfigCount].add(supportedHashedCapabilityIds[j]); } + // Validate that capabilities required by a Workflow DON are still supported + uint32 nodeWorkflowDONId = storedNode.workflowDONId; + if (nodeWorkflowDONId != 0) { + bytes32[] memory workflowDonCapabilityIds = s_dons[nodeWorkflowDONId] + .config[s_dons[nodeWorkflowDONId].configCount] + .capabilityIds; + + for (uint256 j; j < workflowDonCapabilityIds.length; ++j) { + if (!storedNode.supportedHashedCapabilityIds[capabilityConfigCount].contains(workflowDonCapabilityIds[j])) + revert CapabilityRequiredByDON(workflowDonCapabilityIds[j], nodeWorkflowDONId); + } + } + + // Validate that capabilities required by capabilities DONs are still supported + uint256[] memory capabilitiesDONIds = storedNode.capabilitiesDONIds.values(); + for (uint32 j; j < capabilitiesDONIds.length; ++j) { + uint32 donId = uint32(capabilitiesDONIds[j]); + bytes32[] memory donCapabilityIds = s_dons[donId].config[s_dons[donId].configCount].capabilityIds; + + for (uint256 k; k < donCapabilityIds.length; ++k) { + if (!storedNode.supportedHashedCapabilityIds[capabilityConfigCount].contains(donCapabilityIds[k])) + revert CapabilityRequiredByDON(donCapabilityIds[k], donId); + } + } + storedNode.nodeOperatorId = node.nodeOperatorId; storedNode.p2pId = node.p2pId; @@ -656,51 +719,38 @@ contract CapabilitiesRegistry is OwnerIsCreator, TypeAndVersionInterface { if (!s_hashedCapabilityIds.contains(hashedCapabilityId)) revert CapabilityDoesNotExist(hashedCapabilityId); if (!s_deprecatedHashedCapabilityIds.add(hashedCapabilityId)) revert CapabilityIsDeprecated(hashedCapabilityId); - delete s_capabilities[hashedCapabilityId]; emit CapabilityDeprecated(hashedCapabilityId); } } /// @notice Returns a Capability by its hashed ID. /// @dev Use `getHashedCapabilityId` to get the hashed ID. - function getCapability(bytes32 hashedId) external view returns (Capability memory) { - return s_capabilities[hashedId]; + function getCapability(bytes32 hashedId) public view returns (CapabilityInfo memory) { + return ( + CapabilityInfo({ + hashedId: hashedId, + labelledName: s_capabilities[hashedId].labelledName, + version: s_capabilities[hashedId].version, + capabilityType: s_capabilities[hashedId].capabilityType, + responseType: s_capabilities[hashedId].responseType, + configurationContract: s_capabilities[hashedId].configurationContract, + isDeprecated: s_deprecatedHashedCapabilityIds.contains(hashedId) + }) + ); } /// @notice Returns all capabilities. This operation will copy capabilities /// to memory, which can be quite expensive. This is designed to mostly be /// used by view accessors that are queried without any gas fees. - /// @return hashedCapabilityIds bytes32[] List of hashed capability Ids - /// @return capabilities Capability[] List of capabilities - function getCapabilities() - external - view - returns (bytes32[] memory hashedCapabilityIds, Capability[] memory capabilities) - { - hashedCapabilityIds = s_hashedCapabilityIds.values(); - - uint256 numSupportedCapabilities = hashedCapabilityIds.length - s_deprecatedHashedCapabilityIds.length(); - - // Solidity does not support dynamic arrays in memory, so we create a - // fixed-size array and copy the capabilities into it. - capabilities = new Capability[](numSupportedCapabilities); - bytes32[] memory supportedHashedCapabilityIds = new bytes32[](numSupportedCapabilities); - - // We need to keep track of the new index because we are skipping - // deprecated capabilities. - uint256 newIndex; + /// @return CapabilityInfo[] List of capabilities + function getCapabilities() external view returns (CapabilityInfo[] memory) { + bytes32[] memory hashedCapabilityIds = s_hashedCapabilityIds.values(); + CapabilityInfo[] memory capabilitiesInfo = new CapabilityInfo[](hashedCapabilityIds.length); for (uint256 i; i < hashedCapabilityIds.length; ++i) { - bytes32 hashedCapabilityId = hashedCapabilityIds[i]; - - if (!s_deprecatedHashedCapabilityIds.contains(hashedCapabilityId)) { - capabilities[newIndex] = s_capabilities[hashedCapabilityId]; - supportedHashedCapabilityIds[newIndex] = hashedCapabilityId; - ++newIndex; - } + capabilitiesInfo[i] = getCapability(hashedCapabilityIds[i]); } - - return (supportedHashedCapabilityIds, capabilities); + return capabilitiesInfo; } /// @notice This functions returns a capability id that has been hashed to fit into a bytes32 for cheaper access diff --git a/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddCapabilitiesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddCapabilitiesTest.t.sol index 5b653489503..c63decb68be 100644 --- a/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddCapabilitiesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_AddCapabilitiesTest.t.sol @@ -82,7 +82,9 @@ contract CapabilitiesRegistry_AddCapabilitiesTest is BaseTest { vm.expectEmit(true, true, true, true, address(s_CapabilitiesRegistry)); emit CapabilityConfigured(hashedCapabilityId); s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilitiesRegistry.Capability memory storedCapability = s_CapabilitiesRegistry.getCapability(hashedCapabilityId); + CapabilitiesRegistry.CapabilityInfo memory storedCapability = s_CapabilitiesRegistry.getCapability( + hashedCapabilityId + ); assertEq(storedCapability.labelledName, s_basicCapability.labelledName); assertEq(storedCapability.version, s_basicCapability.version); @@ -102,7 +104,9 @@ contract CapabilitiesRegistry_AddCapabilitiesTest is BaseTest { emit CapabilityConfigured(hashedCapabilityId); s_CapabilitiesRegistry.addCapabilities(capabilities); - CapabilitiesRegistry.Capability memory storedCapability = s_CapabilitiesRegistry.getCapability(hashedCapabilityId); + CapabilitiesRegistry.CapabilityInfo memory storedCapability = s_CapabilitiesRegistry.getCapability( + hashedCapabilityId + ); assertEq(storedCapability.labelledName, s_capabilityWithConfigurationContract.labelledName); assertEq(storedCapability.version, s_capabilityWithConfigurationContract.version); diff --git a/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetCapabilitiesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetCapabilitiesTest.t.sol index 95551c19cdb..9702c62b9c7 100644 --- a/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetCapabilitiesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_GetCapabilitiesTest.t.sol @@ -13,15 +13,16 @@ contract CapabilitiesRegistry_GetCapabilitiesTest is BaseTest { s_CapabilitiesRegistry.addCapabilities(capabilities); } - function test_ReturnsCapabilities() public view { - ( - bytes32[] memory hashedCapabilityIds, - CapabilitiesRegistry.Capability[] memory capabilities - ) = s_CapabilitiesRegistry.getCapabilities(); + function test_ReturnsCapabilities() public { + bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( + s_basicCapability.labelledName, + s_basicCapability.version + ); + bytes32[] memory deprecatedCapabilities = new bytes32[](1); + deprecatedCapabilities[0] = hashedCapabilityId; + s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); - assertEq(hashedCapabilityIds.length, 2); - assertEq(hashedCapabilityIds[0], keccak256(abi.encode(capabilities[0].labelledName, capabilities[0].version))); - assertEq(hashedCapabilityIds[1], keccak256(abi.encode(capabilities[1].labelledName, capabilities[1].version))); + CapabilitiesRegistry.CapabilityInfo[] memory capabilities = s_CapabilitiesRegistry.getCapabilities(); assertEq(capabilities.length, 2); @@ -30,6 +31,8 @@ contract CapabilitiesRegistry_GetCapabilitiesTest is BaseTest { assertEq(uint256(capabilities[0].responseType), uint256(CapabilitiesRegistry.CapabilityResponseType.REPORT)); assertEq(uint256(capabilities[0].capabilityType), uint256(CapabilitiesRegistry.CapabilityType.TRIGGER)); assertEq(capabilities[0].configurationContract, address(0)); + assertEq(capabilities[0].hashedId, keccak256(abi.encode(capabilities[0].labelledName, capabilities[0].version))); + assertEq(capabilities[0].isDeprecated, true); assertEq(capabilities[1].labelledName, "read-ethereum-mainnet-gas-price"); assertEq(capabilities[1].version, "1.0.2"); @@ -39,33 +42,7 @@ contract CapabilitiesRegistry_GetCapabilitiesTest is BaseTest { ); assertEq(uint256(capabilities[1].capabilityType), uint256(CapabilitiesRegistry.CapabilityType.ACTION)); assertEq(capabilities[1].configurationContract, address(s_capabilityConfigurationContract)); - } - - function test_ExcludesDeprecatedCapabilities() public { - bytes32 hashedCapabilityId = s_CapabilitiesRegistry.getHashedCapabilityId( - s_basicCapability.labelledName, - s_basicCapability.version - ); - bytes32[] memory deprecatedCapabilities = new bytes32[](1); - deprecatedCapabilities[0] = hashedCapabilityId; - s_CapabilitiesRegistry.deprecateCapabilities(deprecatedCapabilities); - - ( - bytes32[] memory hashedCapabilityIds, - CapabilitiesRegistry.Capability[] memory capabilities - ) = s_CapabilitiesRegistry.getCapabilities(); - - assertEq(hashedCapabilityIds.length, 1); - assertEq(hashedCapabilityIds[0], keccak256(abi.encode(capabilities[0].labelledName, capabilities[0].version))); - - assertEq(capabilities.length, 1); - - assertEq(capabilities[0].labelledName, "read-ethereum-mainnet-gas-price"); - assertEq(capabilities[0].version, "1.0.2"); - assertEq( - uint256(capabilities[0].responseType), - uint256(CapabilitiesRegistry.CapabilityResponseType.OBSERVATION_IDENTICAL) - ); - assertEq(capabilities[0].configurationContract, address(s_capabilityConfigurationContract)); + assertEq(capabilities[1].hashedId, keccak256(abi.encode(capabilities[1].labelledName, capabilities[1].version))); + assertEq(capabilities[1].isDeprecated, false); } } diff --git a/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodesTest.t.sol b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodesTest.t.sol index cc180ec54e5..d61e76c9106 100644 --- a/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodesTest.t.sol +++ b/contracts/src/v0.8/keystone/test/CapabilitiesRegistry_UpdateNodesTest.t.sol @@ -168,6 +168,86 @@ contract CapabilitiesRegistry_UpdateNodesTest is BaseTest { s_CapabilitiesRegistry.updateNodes(nodes); } + function test_RevertWhen_RemovingCapabilityRequiredByWorkflowDON() public { + // SETUP: addDON + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ + capabilityId: s_basicHashedCapabilityId, + config: BASIC_CAPABILITY_CONFIG + }); + bytes32[] memory nodeIds = new bytes32[](2); + nodeIds[0] = P2P_ID; + nodeIds[1] = P2P_ID_TWO; + + // SETUP: updateNodes + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); + bytes32[] memory hashedCapabilityIds = new bytes32[](1); + // DON requires s_basicHashedCapabilityId but we are swapping for + // s_capabilityWithConfigurationContractId + hashedCapabilityIds[0] = s_capabilityWithConfigurationContractId; + nodes[0] = CapabilitiesRegistry.NodeParams({ + nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, + p2pId: P2P_ID, + signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, + hashedCapabilityIds: hashedCapabilityIds + }); + uint32 workflowDonId = 1; + + // Operations + changePrank(ADMIN); + s_CapabilitiesRegistry.addDON(nodeIds, capabilityConfigs, true, true, 1); + + vm.expectRevert( + abi.encodeWithSelector( + CapabilitiesRegistry.CapabilityRequiredByDON.selector, + s_basicHashedCapabilityId, + workflowDonId + ) + ); + s_CapabilitiesRegistry.updateNodes(nodes); + } + + function test_RevertWhen_RemovingCapabilityRequiredByCapabilityDON() public { + // SETUP: addDON + CapabilitiesRegistry.CapabilityConfiguration[] + memory capabilityConfigs = new CapabilitiesRegistry.CapabilityConfiguration[](1); + capabilityConfigs[0] = CapabilitiesRegistry.CapabilityConfiguration({ + capabilityId: s_basicHashedCapabilityId, + config: BASIC_CAPABILITY_CONFIG + }); + bytes32[] memory nodeIds = new bytes32[](2); + nodeIds[0] = P2P_ID; + nodeIds[1] = P2P_ID_TWO; + + // SETUP: updateNodes + CapabilitiesRegistry.NodeParams[] memory nodes = new CapabilitiesRegistry.NodeParams[](1); + bytes32[] memory hashedCapabilityIds = new bytes32[](1); + // DON requires s_basicHashedCapabilityId but we are swapping for + // s_capabilityWithConfigurationContractId + hashedCapabilityIds[0] = s_capabilityWithConfigurationContractId; + nodes[0] = CapabilitiesRegistry.NodeParams({ + nodeOperatorId: TEST_NODE_OPERATOR_ONE_ID, + p2pId: P2P_ID, + signer: NODE_OPERATOR_ONE_SIGNER_ADDRESS, + hashedCapabilityIds: hashedCapabilityIds + }); + uint32 capabilitiesDonId = 1; + + // Operations + changePrank(ADMIN); + s_CapabilitiesRegistry.addDON(nodeIds, capabilityConfigs, true, false, 1); + + vm.expectRevert( + abi.encodeWithSelector( + CapabilitiesRegistry.CapabilityRequiredByDON.selector, + s_basicHashedCapabilityId, + capabilitiesDonId + ) + ); + s_CapabilitiesRegistry.updateNodes(nodes); + } + function test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() public { changePrank(NODE_OPERATOR_ONE_ADMIN); diff --git a/core/capabilities/reader.go b/core/capabilities/reader.go index 0a40b4652bd..a0b7d3d96d8 100644 --- a/core/capabilities/reader.go +++ b/core/capabilities/reader.go @@ -28,7 +28,7 @@ type donID uint32 type state struct { IDsToDONs map[donID]kcr.CapabilitiesRegistryDONInfo IDsToNodes map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo - IDsToCapabilities map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability + IDsToCapabilities map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo } func (r *remoteRegistryReader) LocalNode(ctx context.Context) (capabilities.Node, error) { @@ -80,15 +80,15 @@ func (r *remoteRegistryReader) state(ctx context.Context) (state, error) { idsToDONs[donID(d.Id)] = d } - caps := kcr.GetCapabilities{} + caps := []kcr.CapabilitiesRegistryCapabilityInfo{} err = r.r.GetLatestValue(ctx, "CapabilitiesRegistry", "getCapabilities", nil, &caps) if err != nil { return state{}, err } - idsToCapabilities := map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{} - for i, c := range caps.Capabilities { - idsToCapabilities[caps.HashedCapabilityIds[i]] = c + idsToCapabilities := map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{} + for _, c := range caps { + idsToCapabilities[c.HashedId] = c } nodes := []kcr.CapabilitiesRegistryNodeInfo{} diff --git a/core/capabilities/reader_test.go b/core/capabilities/reader_test.go index 747736c23bd..cc61628c541 100644 --- a/core/capabilities/reader_test.go +++ b/core/capabilities/reader_test.go @@ -218,7 +218,14 @@ func TestReader_Integration(t *testing.T) { assert.Len(t, s.IDsToCapabilities, 1) gotCap := s.IDsToCapabilities[cid] - assert.Equal(t, writeChainCapability, gotCap) + assert.Equal(t, kcr.CapabilitiesRegistryCapabilityInfo{ + HashedId: cid, + LabelledName: "write-chain", + Version: "1.0.1", + ResponseType: uint8(1), + CapabilityType: uint8(0), + IsDeprecated: false, + }, gotCap) assert.Len(t, s.IDsToDONs, 1) assert.Equal(t, kcr.CapabilitiesRegistryDONInfo{ diff --git a/core/capabilities/syncer.go b/core/capabilities/syncer.go index 1a62b8af3a7..800fb325094 100644 --- a/core/capabilities/syncer.go +++ b/core/capabilities/syncer.go @@ -399,7 +399,7 @@ type capabilityService interface { services.Service } -func (s *registrySyncer) addToRegistryAndSetDispatcher(ctx context.Context, capabilityInfo kcr.CapabilitiesRegistryCapability, don kcr.CapabilitiesRegistryDONInfo, newCapFn func(info capabilities.CapabilityInfo) (capabilityService, error)) error { +func (s *registrySyncer) addToRegistryAndSetDispatcher(ctx context.Context, capabilityInfo kcr.CapabilitiesRegistryCapabilityInfo, don kcr.CapabilitiesRegistryDONInfo, newCapFn func(info capabilities.CapabilityInfo) (capabilityService, error)) error { fullCapID := fmt.Sprintf("%s@%s", capabilityInfo.LabelledName, capabilityInfo.Version) info, err := capabilities.NewRemoteCapabilityInfo( fullCapID, @@ -520,7 +520,7 @@ type receiverService interface { remotetypes.Receiver } -func (s *registrySyncer) addReceiver(ctx context.Context, capability kcr.CapabilitiesRegistryCapability, don kcr.CapabilitiesRegistryDONInfo, newReceiverFn func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error)) error { +func (s *registrySyncer) addReceiver(ctx context.Context, capability kcr.CapabilitiesRegistryCapabilityInfo, don kcr.CapabilitiesRegistryDONInfo, newReceiverFn func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error)) error { fullCapID := fmt.Sprintf("%s@%s", capability.LabelledName, capability.Version) info, err := capabilities.NewRemoteCapabilityInfo( fullCapID, diff --git a/core/capabilities/syncer_test.go b/core/capabilities/syncer_test.go index c1bc379e2f3..2c5f871bdb8 100644 --- a/core/capabilities/syncer_test.go +++ b/core/capabilities/syncer_test.go @@ -160,7 +160,7 @@ func TestSyncer_WiresUpExternalCapabilities(t *testing.T) { }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", @@ -262,7 +262,7 @@ func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", @@ -384,7 +384,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDON(t *testing.T) { }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", @@ -539,7 +539,7 @@ func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities( }, }, }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapability{ + IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ triggerCapID: { LabelledName: "streams-trigger", Version: "1.0.0", diff --git a/core/gethwrappers/keystone/generated/capabilities_registry/capabilities_registry.go b/core/gethwrappers/keystone/generated/capabilities_registry/capabilities_registry.go index dfb70824fee..b701f312c70 100644 --- a/core/gethwrappers/keystone/generated/capabilities_registry/capabilities_registry.go +++ b/core/gethwrappers/keystone/generated/capabilities_registry/capabilities_registry.go @@ -43,6 +43,16 @@ type CapabilitiesRegistryCapabilityConfiguration struct { Config []byte } +type CapabilitiesRegistryCapabilityInfo struct { + HashedId [32]byte + LabelledName string + Version string + CapabilityType uint8 + ResponseType uint8 + ConfigurationContract common.Address + IsDeprecated bool +} + type CapabilitiesRegistryDONInfo struct { Id uint32 ConfigCount uint32 @@ -76,8 +86,8 @@ type CapabilitiesRegistryNodeParams struct { } var CapabilitiesRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"nodeCount\",\"type\":\"uint256\"}],\"name\":\"InvalidFaultTolerance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"InvalidNodeCapabilities\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeOperatorAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"InvalidNodeP2PId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lengthOne\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lengthTwo\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfCapabilitiesDON\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfWorkflowDON\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDeprecated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilitiesRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"name\":\"addCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"addDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"addNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"addNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"deprecateCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilities\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilitiesRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedId\",\"type\":\"bytes32\"}],\"name\":\"getCapability\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilitiesRegistry.Capability\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getCapabilityConfigs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilitiesRegistry.DONInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilitiesRegistry.DONInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"getHashedCapabilityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"getNode\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeInfo\",\"name\":\"nodeInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"getNodeOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeOperators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodes\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"isCapabilityDeprecated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"donIds\",\"type\":\"uint32[]\"}],\"name\":\"removeDONs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"}],\"name\":\"removeNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"removedNodeP2PIds\",\"type\":\"bytes32[]\"}],\"name\":\"removeNodes\",\"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\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"updateNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6080604052600e80546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6150bf80620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635e65e309116100ee5780638da5cb5b11610097578063d8bc7b6811610071578063d8bc7b68146103f6578063ddbe4f8214610409578063e29581aa1461041f578063f2fde38b1461043457600080fd5b80638da5cb5b1461039b5780639cb7c5f4146103c3578063d59a79f6146103e357600080fd5b806373ac22b4116100c857806373ac22b41461036d57806379ba50971461038057806386fa42461461038857600080fd5b80635e65e3091461033257806366acaa3314610345578063715f52951461035a57600080fd5b8063235374051161015b578063398f377311610135578063398f3773146102cb5780633f2a13c9146102de57806350c946fe146102ff5780635d83d9671461031f57600080fd5b80632353740514610285578063275459f2146102a55780632c01a1e8146102b857600080fd5b80631d05394c1161018c5780631d05394c1461023b578063214502431461025057806322bdbcbc1461026557600080fd5b80630fe5800a146101b357806312570011146101d9578063181f5a77146101fc575b600080fd5b6101c66101c1366004613ef4565b610447565b6040519081526020015b60405180910390f35b6101ec6101e7366004613f58565b61047b565b60405190151581526020016101d0565b604080518082018252601a81527f4361706162696c6974696573526567697374727920312e302e30000000000000602082015290516101d09190613fdf565b61024e610249366004614037565b610488565b005b6102586106ab565b6040516101d09190614197565b610278610273366004614230565b610810565b6040516101d09190614288565b610298610293366004614230565b6108fd565b6040516101d0919061429b565b61024e6102b3366004614037565b610941565b61024e6102c6366004614037565b610a18565b61024e6102d9366004614037565b610cbd565b6102f16102ec3660046142ae565b610e85565b6040516101d09291906142d8565b61031261030d366004613f58565b611071565b6040516101d09190614369565b61024e61032d366004614037565b61114b565b61024e610340366004614037565b611299565b61034d611718565b6040516101d0919061437c565b61024e610368366004614037565b611903565b61024e61037b366004614037565b6119be565b61024e611e9a565b61024e6103963660046143ef565b611f97565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d0565b6103d66103d1366004613f58565b6122dd565b6040516101d09190614517565b61024e6103f1366004614549565b6124e2565b61024e6104043660046145fe565b6125ab565b610411612675565b6040516101d09291906146a3565b6104276129d8565b6040516101d09190614733565b61024e6104423660046147ca565b612aea565b6000828260405160200161045c9291906142d8565b6040516020818303038152906040528051906020012090505b92915050565b6000610475600583612afe565b610490612b19565b60005b818110156106a65760008383838181106104af576104af6147e5565b90506020020160208101906104c49190614230565b63ffffffff8181166000908152600d60209081526040808320805464010000000081049095168085526001820190935290832094955093909290916a010000000000000000000090910460ff16905b61051c83612b9c565b8110156105c457811561057257600c60006105378584612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556105b4565b6105b28663ffffffff16600c60006105938588612ba690919063ffffffff16565b8152602001908152602001600020600401612bb290919063ffffffff16565b505b6105bd81614843565b9050610513565b508354640100000000900463ffffffff1660000361061b576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff861660048201526024015b60405180910390fd5b63ffffffff85166000818152600d6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000001690558051938452908301919091527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a150505050508061069f90614843565b9050610493565b505050565b600e54606090640100000000900463ffffffff1660006106cc60018361487b565b63ffffffff1667ffffffffffffffff8111156106ea576106ea613d8e565b60405190808252806020026020018201604052801561077157816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816107085790505b509050600060015b8363ffffffff168163ffffffff1610156107ed5763ffffffff8082166000908152600d602052604090205416156107dd576107b381612bbe565b8383815181106107c5576107c56147e5565b6020026020010181905250816107da90614843565b91505b6107e681614898565b9050610779565b506107f960018461487b565b63ffffffff168114610809578082525b5092915050565b60408051808201909152600081526060602082015263ffffffff82166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191610874906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546108a0906148bb565b80156108ed5780601f106108c2576101008083540402835291602001916108ed565b820191906000526020600020905b8154815290600101906020018083116108d057829003601f168201915b5050505050815250509050919050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c081019190915261047582612bbe565b610949612b19565b60005b63ffffffff81168211156106a657600083838363ffffffff16818110610974576109746147e5565b90506020020160208101906109899190614230565b63ffffffff81166000908152600b6020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681559192506109d46001830182613d21565b505060405163ffffffff8216907fa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a90600090a250610a1181614898565b905061094c565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb7576000848483818110610a5257610a526147e5565b602090810292909201356000818152600c90935260409092206001810154929350919050610aaf576040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260048101839052602401610612565b6000610abd82600401612b9c565b1115610b1257610ad06004820184612ba6565b6040517f60a6d89800000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260248101839052604401610612565b805468010000000000000000900463ffffffff1615610b7a5780546040517f60b9df730000000000000000000000000000000000000000000000000000000081526801000000000000000090910463ffffffff16600482015260248101839052604401610612565b83158015610bb45750805463ffffffff166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15610bed576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6001810154610bfe90600790612bb2565b506002810154610c1090600990612bb2565b506000828152600c6020526040812080547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815560018101829055600281018290559060048201818181610c658282613d5b565b5050505050507f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320582604051610c9c91815260200190565b60405180910390a1505080610cb090614843565b9050610a36565b50505050565b610cc5612b19565b60005b818110156106a6576000838383818110610ce457610ce46147e5565b9050602002810190610cf6919061490e565b610cff9061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16610d50576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e54604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600b909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610ddc9082614a04565b5050600e8054909150600090610df79063ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff168163ffffffff167f78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e8460200151604051610e6a9190613fdf565b60405180910390a3505080610e7e90614843565b9050610cc8565b63ffffffff8083166000908152600d60209081526040808320805464010000000090049094168084526001909401825280832085845260030190915281208054606093849390929091610ed7906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610f03906148bb565b8015610f505780601f10610f2557610100808354040283529160200191610f50565b820191906000526020600020905b815481529060010190602001808311610f3357829003601f168201915b5050506000888152600260208190526040909120015492935060609262010000900473ffffffffffffffffffffffffffffffffffffffff16159150611063905057600086815260026020819052604091829020015490517f8318ed5d00000000000000000000000000000000000000000000000000000000815263ffffffff891660048201526201000090910473ffffffffffffffffffffffffffffffffffffffff1690638318ed5d90602401600060405180830381865afa15801561101a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526110609190810190614b1e565b90505b9093509150505b9250929050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c08101919091526040805160e0810182526000848152600c6020908152838220805463ffffffff8082168652640100000000820481168487018190526801000000000000000090920416858701526001820154606086015260028201546080860152835260030190529190912060a082019061112090612e92565b8152602001611143600c6000868152602001908152602001600020600401612e92565b905292915050565b611153612b19565b60005b818110156106a6576000838383818110611172576111726147e5565b90506020020135905061118f816003612afe90919063ffffffff16565b6111c8576040517fe181733f00000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6111d3600582612e9f565b61120c576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6000818152600260205260408120906112258282613d21565b611233600183016000613d21565b5060020180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a25061129281614843565b9050611156565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106112d3576112d36147e5565b90506020028101906112e59190614b8c565b6112ee90614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611344906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611370906148bb565b80156113bd5780601f10611392576101008083540402835291602001916113bd565b820191906000526020600020905b8154815290600101906020018083116113a057829003601f168201915b5050505050815250509050831580156113ed5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611426576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015461147a5782604001516040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301516114b5576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154602084015181146115365760208401516114d690600790612afe565b1561150d576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208401516001830155611522600782612bb2565b50602084015161153490600790612e9f565b505b6060840151805160000361157857806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b8254600090849060049061159990640100000000900463ffffffff16614898565b91906101000a81548163ffffffff021916908363ffffffff1602179055905060005b8251811015611686576115f18382815181106115d9576115d96147e5565b60200260200101516003612afe90919063ffffffff16565b61162957826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b61167583828151811061163e5761163e6147e5565b60200260200101518660030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b5061167f81614843565b90506115bb565b50855184547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9091169081178555604080880151600287018190556020808a01518351928352908201527f4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b910160405180910390a25050505050508061171190614843565b90506112b7565b600e5460609063ffffffff16600061173160018361487b565b63ffffffff1667ffffffffffffffff81111561174f5761174f613d8e565b60405190808252806020026020018201604052801561179557816020015b60408051808201909152600081526060602082015281526020019060019003908161176d5790505b509050600060015b8363ffffffff168163ffffffff1610156118ed5763ffffffff81166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16156118dd5763ffffffff81166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191611831906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461185d906148bb565b80156118aa5780601f1061187f576101008083540402835291602001916118aa565b820191906000526020600020905b81548152906001019060200180831161188d57829003601f168201915b5050505050815250508383815181106118c5576118c56147e5565b6020026020010181905250816118da90614843565b91505b6118e681614898565b905061179d565b50600e546107f99060019063ffffffff1661487b565b61190b612b19565b60005b818110156106a657600083838381811061192a5761192a6147e5565b905060200281019061193c9190614ca6565b61194590614ce9565b9050600061195b82600001518360200151610447565b9050611968600382612e9f565b6119a1576040517febf5255100000000000000000000000000000000000000000000000000000000815260048101829052602401610612565b6119ab8183612eab565b5050806119b790614843565b905061190e565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb75760008484838181106119f8576119f86147e5565b9050602002810190611a0a9190614b8c565b611a1390614bc0565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611a69906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611a95906148bb565b8015611ae25780601f10611ab757610100808354040283529160200191611ae2565b820191906000526020600020905b815481529060010190602001808311611ac557829003601f168201915b50505091909252505081519192505073ffffffffffffffffffffffffffffffffffffffff16611b485781516040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff9091166004820152602401610612565b83158015611b6d5750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611ba6576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b6040808301516000908152600c60205220600181015415611bfb5782604001516040517f5461848300000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b6040830151611c3e5782604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161061291815260200190565b60208301511580611c5b57506020830151611c5b90600790612afe565b15611c92576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608301518051600003611cd457806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b81548290600490611cf290640100000000900463ffffffff16614898565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041660005b8251811015611dd057611d3b8382815181106115d9576115d96147e5565b611d7357826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106129190614c93565b611dbf838281518110611d8857611d886147e5565b60200260200101518560030160008563ffffffff1663ffffffff168152602001908152602001600020612e9f90919063ffffffff16565b50611dc981614843565b9050611d1d565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff91821617845560408601516002850155602086015160018501819055611e269160079190612e9f16565b506040850151611e3890600990612e9f565b50845160408087015160208089015183519283529082015263ffffffff909216917f74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05910160405180910390a2505050505080611e9390614843565b90506119dc565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610612565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b828114611fda576040517fab8b67c60000000000000000000000000000000000000000000000000000000081526004810184905260248101829052604401610612565b6000805473ffffffffffffffffffffffffffffffffffffffff16905b848110156122d5576000868683818110612012576120126147e5565b90506020020160208101906120279190614230565b63ffffffff81166000908152600b6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff16612096576040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152602401610612565b60008686858181106120aa576120aa6147e5565b90506020028101906120bc919061490e565b6120c59061494c565b805190915073ffffffffffffffffffffffffffffffffffffffff16612116576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16331480159061215357503373ffffffffffffffffffffffffffffffffffffffff861614155b1561218c576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610612565b8051825473ffffffffffffffffffffffffffffffffffffffff908116911614158061220857506020808201516040516121c59201613fdf565b60405160208183030381529060405280519060200120826001016040516020016121ef9190614d8f565b6040516020818303038152906040528051906020012014155b156122c157805182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602081015160018301906122629082614a04565b50806000015173ffffffffffffffffffffffffffffffffffffffff168363ffffffff167f86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a2883602001516040516122b89190613fdf565b60405180910390a35b505050806122ce90614843565b9050611ff6565b505050505050565b61230d6040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b60008281526002602052604090819020815160a08101909252805482908290612335906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612361906148bb565b80156123ae5780601f10612383576101008083540402835291602001916123ae565b820191906000526020600020905b81548152906001019060200180831161239157829003601f168201915b505050505081526020016001820180546123c7906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546123f3906148bb565b80156124405780601f1061241557610100808354040283529160200191612440565b820191906000526020600020905b81548152906001019060200180831161242357829003601f168201915b5050509183525050600282015460209091019060ff1660038111156124675761246761445b565b60038111156124785761247861445b565b81526020016002820160019054906101000a900460ff1660018111156124a0576124a061445b565b60018111156124b1576124b161445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff1660209091015292915050565b6124ea612b19565b63ffffffff8089166000908152600d602052604081205464010000000090049091169081900361254e576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a166004820152602401610612565b6125a0888888886040518060a001604052808f63ffffffff1681526020018761257690614898565b97508763ffffffff1681526020018a1515815260200189151581526020018860ff1681525061313f565b505050505050505050565b6125b3612b19565b600e805460009164010000000090910463ffffffff169060046125d583614898565b82546101009290920a63ffffffff81810219909316918316021790915581166000818152600d602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a08101835292835260019083015286151590820152841515606082015260ff8416608082015290915061266b90899089908990899061313f565b5050505050505050565b6060806126826003612e92565b915060006126906005612b9c565b835161269c9190614e38565b90508067ffffffffffffffff8111156126b7576126b7613d8e565b60405190808252806020026020018201604052801561271857816020015b6127056040805160a081018252606080825260208201529081016000815260200160008152600060209091015290565b8152602001906001900390816126d55790505b50915060008167ffffffffffffffff81111561273657612736613d8e565b60405190808252806020026020018201604052801561275f578160200160208202803683370190505b5090506000805b85518110156129ce576000868281518110612783576127836147e5565b602002602001015190506127a1816005612afe90919063ffffffff16565b6129bd5760008181526002602052604090819020815160a081019092528054829082906127cd906148bb565b80601f01602080910402602001604051908101604052809291908181526020018280546127f9906148bb565b80156128465780601f1061281b57610100808354040283529160200191612846565b820191906000526020600020905b81548152906001019060200180831161282957829003601f168201915b5050505050815260200160018201805461285f906148bb565b80601f016020809104026020016040519081016040528092919081815260200182805461288b906148bb565b80156128d85780601f106128ad576101008083540402835291602001916128d8565b820191906000526020600020905b8154815290600101906020018083116128bb57829003601f168201915b5050509183525050600282015460209091019060ff1660038111156128ff576128ff61445b565b60038111156129105761291061445b565b81526020016002820160019054906101000a900460ff1660018111156129385761293861445b565b60018111156129495761294961445b565b81526002919091015462010000900473ffffffffffffffffffffffffffffffffffffffff166020909101528651879085908110612988576129886147e5565b6020026020010181905250808484815181106129a6576129a66147e5565b60209081029190910101526129ba83614843565b92505b506129c781614843565b9050612766565b5090949293505050565b606060006129e66009612e92565b90506000815167ffffffffffffffff811115612a0457612a04613d8e565b604051908082528060200260200182016040528015612a8b57816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181612a225790505b50905060005b825181101561080957612abc838281518110612aaf57612aaf6147e5565b6020026020010151611071565b828281518110612ace57612ace6147e5565b602002602001018190525080612ae390614843565b9050612a91565b612af2612b19565b612afb81613983565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610612565b565b6000610475825490565b6000612b128383613a78565b6000612b128383613aa2565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff8581168352600d8252848320805464010000000090049091168084526001909101825284832060028101805487518186028101860190985280885295969295919493909190830182828015612c6f57602002820191906000526020600020905b815481526020019060010190808311612c5b575b505050505090506000815167ffffffffffffffff811115612c9257612c92613d8e565b604051908082528060200260200182016040528015612cd857816020015b604080518082019091526000815260606020820152815260200190600190039081612cb05790505b50905060005b8151811015612df9576040518060400160405280848381518110612d0457612d046147e5565b60200260200101518152602001856003016000868581518110612d2957612d296147e5565b602002602001015181526020019081526020016000208054612d4a906148bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612d76906148bb565b8015612dc35780601f10612d9857610100808354040283529160200191612dc3565b820191906000526020600020905b815481529060010190602001808311612da657829003601f168201915b5050505050815250828281518110612ddd57612ddd6147e5565b602002602001018190525080612df290614843565b9050612cde565b506040805160e08101825263ffffffff8089166000818152600d6020818152868320548086168752948b168187015260ff680100000000000000008604811697870197909752690100000000000000000085048716151560608701529290915290526a010000000000000000000090049091161515608082015260a08101612e8085612e92565b81526020019190915295945050505050565b60606000612b1283613b95565b6000612b128383613bf1565b608081015173ffffffffffffffffffffffffffffffffffffffff1615612ff957608081015173ffffffffffffffffffffffffffffffffffffffff163b1580612fa4575060808101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f78bea72100000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff909116906301ffc9a790602401602060405180830381865afa158015612f7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa29190614e4b565b155b15612ff95760808101516040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610612565b6000828152600260205260409020815182919081906130189082614a04565b506020820151600182019061302d9082614a04565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600183600381111561306f5761306f61445b565b021790555060608201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360018111156130b6576130b661445b565b0217905550608091909101516002909101805473ffffffffffffffffffffffffffffffffffffffff90921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405182907f04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae90600090a25050565b805163ffffffff9081166000908152600d602090815260408083208286015190941683526001909301905220608082015160ff16158061319157506080820151859061318c906001614e68565b60ff16115b156131da5760808201516040517f25b4d61800000000000000000000000000000000000000000000000000000000815260ff909116600482015260248101869052604401610612565b6001826020015163ffffffff1611156132ca57815163ffffffff166000908152600d60209081526040822090840151600191820191839161321b919061487b565b63ffffffff1663ffffffff168152602001908152602001600020905060005b61324382612b9c565b8110156132c757613272846000015163ffffffff16600c60006105938587600001612ba690919063ffffffff16565b50600c60006132818484612ba6565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556132c081614843565b905061323a565b50505b60005b8581101561350c576132fa8787838181106132ea576132ea6147e5565b8592602090910201359050612e9f565b61335b578251878783818110613312576133126147e5565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8260600151156134b257825163ffffffff16600c6000898985818110613383576133836147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff16148015906133fd5750600c60008888848181106133ce576133ce6147e5565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff1615155b1561345f578251878783818110613416576134166147e5565b6040517f60b9df7300000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610612565b8251600c6000898985818110613477576134776147e5565b90506020020135815260200190815260200160002060000160086101000a81548163ffffffff021916908363ffffffff1602179055506134fc565b82516134fa9063ffffffff16600c60008a8a868181106134d4576134d46147e5565b905060200201358152602001908152602001600020600401612e9f90919063ffffffff16565b505b61350581614843565b90506132cd565b5060005b838110156137f8573685858381811061352b5761352b6147e5565b905060200281019061353d919061490e565b905061354b60038235612afe565b613584576040517fe181733f00000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b61359060058235612afe565b156135ca576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815281356004820152602401610612565b80356000908152600384016020526040812080546135e7906148bb565b905011156136335783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015281356024820152604401610612565b60005b87811015613745576136da8235600c60008c8c86818110613659576136596147e5565b9050602002013581526020019081526020016000206003016000600c60008e8e88818110613689576136896147e5565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020612afe90919063ffffffff16565b613735578888828181106136f0576136f06147e5565b6040517fa7e792500000000000000000000000000000000000000000000000000000000081526020909102929092013560048301525082356024820152604401610612565b61373e81614843565b9050613636565b506002830180546001810182556000918252602091829020833591015561376e90820182614e81565b8235600090815260038601602052604090209161378c919083614ee6565b5083516020808601516137e792918435908c908c906137ad90880188614e81565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613c4092505050565b506137f181614843565b9050613510565b50604080830151835163ffffffff9081166000908152600d602090815284822080549415156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff90951694909417909355606086015186518316825284822080549115156a0100000000000000000000027fffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffff9092169190911790556080860151865183168252848220805460ff9290921668010000000000000000027fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c158170365192613973929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613a02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610612565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110613a8f57613a8f6147e5565b9060005260206000200154905092915050565b60008181526001830160205260408120548015613b8b576000613ac6600183614e38565b8554909150600090613ada90600190614e38565b9050818114613b3f576000866000018281548110613afa57613afa6147e5565b9060005260206000200154905080876000018481548110613b1d57613b1d6147e5565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b5057613b50615001565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610475565b6000915050610475565b606081600001805480602002602001604051908101604052809291908181526020018280548015613be557602002820191906000526020600020905b815481526020019060010190808311613bd1575b50505050509050919050565b6000818152600183016020526040812054613c3857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610475565b506000610475565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff16156122d557600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c90613ce7908690869086908b908d90600401615030565b600060405180830381600087803b158015613d0157600080fd5b505af1158015613d15573d6000803e3d6000fd5b50505050505050505050565b508054613d2d906148bb565b6000825580601f10613d3d575050565b601f016020900490600052602060002090810190612afb9190613d75565b5080546000825590600052602060002090810190612afb91905b5b80821115613d8a5760008155600101613d76565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715613de057613de0613d8e565b60405290565b60405160a0810167ffffffffffffffff81118282101715613de057613de0613d8e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613e5057613e50613d8e565b604052919050565b600067ffffffffffffffff821115613e7257613e72613d8e565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613eaf57600080fd5b8135613ec2613ebd82613e58565b613e09565b818152846020838601011115613ed757600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613f0757600080fd5b823567ffffffffffffffff80821115613f1f57600080fd5b613f2b86838701613e9e565b93506020850135915080821115613f4157600080fd5b50613f4e85828601613e9e565b9150509250929050565b600060208284031215613f6a57600080fd5b5035919050565b60005b83811015613f8c578181015183820152602001613f74565b50506000910152565b60008151808452613fad816020860160208601613f71565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612b126020830184613f95565b60008083601f84011261400457600080fd5b50813567ffffffffffffffff81111561401c57600080fd5b6020830191508360208260051b850101111561106a57600080fd5b6000806020838503121561404a57600080fd5b823567ffffffffffffffff81111561406157600080fd5b61406d85828601613ff2565b90969095509350505050565b600081518084526020808501945080840160005b838110156140a95781518752958201959082019060010161408d565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b8581101561411057828403895281518051855285015160408686018190526140fc81870183613f95565b9a87019a95505050908401906001016140d2565b5091979650505050505050565b600063ffffffff8083511684528060208401511660208501525060ff604083015116604084015260608201511515606084015260808201511515608084015260a082015160e060a085015261417560e0850182614079565b905060c083015184820360c086015261418e82826140b4565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526141f885835161411d565b945092850192908501906001016141be565b5092979650505050505050565b803563ffffffff8116811461422b57600080fd5b919050565b60006020828403121561424257600080fd5b612b1282614217565b73ffffffffffffffffffffffffffffffffffffffff815116825260006020820151604060208501526142806040850182613f95565b949350505050565b602081526000612b12602083018461424b565b602081526000612b12602083018461411d565b600080604083850312156142c157600080fd5b6142ca83614217565b946020939093013593505050565b6040815260006142eb6040830185613f95565b828103602084015261418e8185613f95565b600063ffffffff80835116845280602084015116602085015280604084015116604085015250606082015160608401526080820151608084015260a082015160e060a085015261435060e0850182614079565b905060c083015184820360c086015261418e8282614079565b602081526000612b1260208301846142fd565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526143dd85835161424b565b945092850192908501906001016143a3565b6000806000806040858703121561440557600080fd5b843567ffffffffffffffff8082111561441d57600080fd5b61442988838901613ff2565b9096509450602087013591508082111561444257600080fd5b5061444f87828801613ff2565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000815160a0845261449f60a0850182613f95565b9050602083015184820360208601526144b88282613f95565b9150506040830151600481106144d0576144d061445b565b60408501526060830151600281106144ea576144ea61445b565b606085015260809283015173ffffffffffffffffffffffffffffffffffffffff1692909301919091525090565b602081526000612b12602083018461448a565b8015158114612afb57600080fd5b803560ff8116811461422b57600080fd5b60008060008060008060008060c0898b03121561456557600080fd5b61456e89614217565b9750602089013567ffffffffffffffff8082111561458b57600080fd5b6145978c838d01613ff2565b909950975060408b01359150808211156145b057600080fd5b506145bd8b828c01613ff2565b90965094505060608901356145d18161452a565b925060808901356145e18161452a565b91506145ef60a08a01614538565b90509295985092959890939650565b600080600080600080600060a0888a03121561461957600080fd5b873567ffffffffffffffff8082111561463157600080fd5b61463d8b838c01613ff2565b909950975060208a013591508082111561465657600080fd5b506146638a828b01613ff2565b90965094505060408801356146778161452a565b925060608801356146878161452a565b915061469560808901614538565b905092959891949750929550565b6040815260006146b66040830185614079565b6020838203818501528185518084528284019150828160051b85010183880160005b83811015614724577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087840301855261471283835161448a565b948601949250908501906001016146d8565b50909998505050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561420a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526147948583516142fd565b9450928501929085019060010161475a565b803573ffffffffffffffffffffffffffffffffffffffff8116811461422b57600080fd5b6000602082840312156147dc57600080fd5b612b12826147a6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361487457614874614814565b5060010190565b63ffffffff82811682821603908082111561080957610809614814565b600063ffffffff8083168181036148b1576148b1614814565b6001019392505050565b600181811c908216806148cf57607f821691505b602082108103614908577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261494257600080fd5b9190910192915050565b60006040823603121561495e57600080fd5b6040516040810167ffffffffffffffff828210818311171561498257614982613d8e565b8160405261498f856147a6565b835260208501359150808211156149a557600080fd5b506149b236828601613e9e565b60208301525092915050565b601f8211156106a657600081815260208120601f850160051c810160208610156149e55750805b601f850160051c820191505b818110156122d5578281556001016149f1565b815167ffffffffffffffff811115614a1e57614a1e613d8e565b614a3281614a2c84546148bb565b846149be565b602080601f831160018114614a855760008415614a4f5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556122d5565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015614ad257888601518255948401946001909101908401614ab3565b5085821015614b0e57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614b3057600080fd5b815167ffffffffffffffff811115614b4757600080fd5b8201601f81018413614b5857600080fd5b8051614b66613ebd82613e58565b818152856020838501011115614b7b57600080fd5b61418e826020830160208601613f71565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261494257600080fd5b600060808236031215614bd257600080fd5b614bda613dbd565b614be383614217565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff80821115614c1457600080fd5b9085019036601f830112614c2757600080fd5b813581811115614c3957614c39613d8e565b8060051b9150614c4a848301613e09565b8181529183018401918481019036841115614c6457600080fd5b938501935b83851015614c8257843582529385019390850190614c69565b606087015250939695505050505050565b602081526000612b126020830184614079565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6183360301811261494257600080fd5b80356002811061422b57600080fd5b600060a08236031215614cfb57600080fd5b614d03613de6565b823567ffffffffffffffff80821115614d1b57600080fd5b614d2736838701613e9e565b83526020850135915080821115614d3d57600080fd5b50614d4a36828601613e9e565b602083015250604083013560048110614d6257600080fd5b6040820152614d7360608401614cda565b6060820152614d84608084016147a6565b608082015292915050565b6000602080835260008454614da3816148bb565b80848701526040600180841660008114614dc45760018114614dfc57614e2a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614e2a565b896000528660002060005b85811015614e225781548b8201860152908301908801614e07565b8a0184019650505b509398975050505050505050565b8181038181111561047557610475614814565b600060208284031215614e5d57600080fd5b8151612b128161452a565b60ff818116838216019081111561047557610475614814565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614eb657600080fd5b83018035915067ffffffffffffffff821115614ed157600080fd5b60200191503681900382131561106a57600080fd5b67ffffffffffffffff831115614efe57614efe613d8e565b614f1283614f0c83546148bb565b836149be565b6000601f841160018114614f645760008515614f2e5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614ffa565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614fb35786850135825560209485019460019092019101614f93565b5086821015614fee577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86111561506957600080fd5b8560051b808860a0850137820182810360a0908101602085015261508f90820187613f95565b91505063ffffffff8085166040840152808416606084015250969550505050505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityIsDeprecated\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"CapabilityRequiredByDON\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"DONDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"DuplicateDONNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proposedConfigurationContract\",\"type\":\"address\"}],\"name\":\"InvalidCapabilityConfigurationContractInterface\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"nodeCount\",\"type\":\"uint256\"}],\"name\":\"InvalidFaultTolerance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"InvalidNodeCapabilities\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeOperatorAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"InvalidNodeP2PId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNodeSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"lengthOne\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lengthTwo\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"NodeDoesNotSupportCapability\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfCapabilitiesDON\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nodeP2PId\",\"type\":\"bytes32\"}],\"name\":\"NodePartOfWorkflowDON\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"CapabilityDeprecated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"NodeOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NodeOperatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"NodeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"}],\"name\":\"NodeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"}],\"internalType\":\"structCapabilitiesRegistry.Capability[]\",\"name\":\"capabilities\",\"type\":\"tuple[]\"}],\"name\":\"addCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"addDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"addNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"addNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"name\":\"deprecateCapabilities\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapabilities\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"hashedId\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isDeprecated\",\"type\":\"bool\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedId\",\"type\":\"bytes32\"}],\"name\":\"getCapability\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"hashedId\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityType\",\"name\":\"capabilityType\",\"type\":\"uint8\"},{\"internalType\":\"enumCapabilitiesRegistry.CapabilityResponseType\",\"name\":\"responseType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"configurationContract\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isDeprecated\",\"type\":\"bool\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"}],\"name\":\"getCapabilityConfigs\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"getDON\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilitiesRegistry.DONInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDONs\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodeP2PIds\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"}],\"internalType\":\"structCapabilitiesRegistry.DONInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"labelledName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"getHashedCapabilityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"}],\"name\":\"getNode\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeInfo\",\"name\":\"nodeInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"}],\"name\":\"getNodeOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeOperators\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodes\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"workflowDONId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"capabilitiesDONIds\",\"type\":\"uint256[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedCapabilityId\",\"type\":\"bytes32\"}],\"name\":\"isCapabilityDeprecated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"donIds\",\"type\":\"uint32[]\"}],\"name\":\"removeDONs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"}],\"name\":\"removeNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"removedNodeP2PIds\",\"type\":\"bytes32[]\"}],\"name\":\"removeNodes\",\"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\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"capabilityId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"structCapabilitiesRegistry.CapabilityConfiguration[]\",\"name\":\"capabilityConfigurations\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"isPublic\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"acceptsWorkflows\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"name\":\"updateDON\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"nodeOperatorIds\",\"type\":\"uint32[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structCapabilitiesRegistry.NodeOperator[]\",\"name\":\"nodeOperators\",\"type\":\"tuple[]\"}],\"name\":\"updateNodeOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nodeOperatorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"signer\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"p2pId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashedCapabilityIds\",\"type\":\"bytes32[]\"}],\"internalType\":\"structCapabilitiesRegistry.NodeParams[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"name\":\"updateNodes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052600e80546001600160401b0319166401000000011790553480156200002857600080fd5b503380600081620000805760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000b357620000b381620000bc565b50505062000167565b336001600160a01b03821603620001165760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000077565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b61517380620001776000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80635e65e309116100ee5780638da5cb5b11610097578063d8bc7b6811610071578063d8bc7b68146103f6578063ddbe4f8214610409578063e29581aa1461041e578063f2fde38b1461043357600080fd5b80638da5cb5b1461039b5780639cb7c5f4146103c3578063d59a79f6146103e357600080fd5b806373ac22b4116100c857806373ac22b41461036d57806379ba50971461038057806386fa42461461038857600080fd5b80635e65e3091461033257806366acaa3314610345578063715f52951461035a57600080fd5b8063235374051161015b578063398f377311610135578063398f3773146102cb5780633f2a13c9146102de57806350c946fe146102ff5780635d83d9671461031f57600080fd5b80632353740514610285578063275459f2146102a55780632c01a1e8146102b857600080fd5b80631d05394c1161018c5780631d05394c1461023b578063214502431461025057806322bdbcbc1461026557600080fd5b80630fe5800a146101b357806312570011146101d9578063181f5a77146101fc575b600080fd5b6101c66101c1366004613f39565b610446565b6040519081526020015b60405180910390f35b6101ec6101e7366004613f9d565b61047a565b60405190151581526020016101d0565b604080518082018252601a81527f4361706162696c6974696573526567697374727920312e302e30000000000000602082015290516101d09190614024565b61024e61024936600461407c565b610487565b005b6102586106aa565b6040516101d091906141dc565b610278610273366004614275565b61080f565b6040516101d091906142cd565b610298610293366004614275565b6108fc565b6040516101d091906142e0565b61024e6102b336600461407c565b610940565b61024e6102c636600461407c565b610a17565b61024e6102d936600461407c565b610cbc565b6102f16102ec3660046142f3565b610e84565b6040516101d092919061431d565b61031261030d366004613f9d565b611070565b6040516101d091906143e2565b61024e61032d36600461407c565b61114a565b61024e61034036600461407c565b611247565b61034d61198d565b6040516101d091906143f5565b61024e61036836600461407c565b611b78565b61024e61037b36600461407c565b611c33565b61024e61210f565b61024e610396366004614468565b61220c565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d0565b6103d66103d1366004613f9d565b612552565b6040516101d091906145b7565b61024e6103f13660046145e9565b61278d565b61024e61040436600461469e565b612856565b610411612920565b6040516101d09190614743565b610426612a1d565b6040516101d091906147b6565b61024e61044136600461484d565b612b2f565b6000828260405160200161045b92919061431d565b6040516020818303038152906040528051906020012090505b92915050565b6000610474600583612b43565b61048f612b5e565b60005b818110156106a55760008383838181106104ae576104ae614868565b90506020020160208101906104c39190614275565b63ffffffff8181166000908152600d60209081526040808320805464010000000081049095168085526001820190935290832094955093909290916a010000000000000000000090910460ff16905b61051b83612be1565b8110156105c357811561057157600c60006105368584612beb565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1690556105b3565b6105b18663ffffffff16600c60006105928588612beb90919063ffffffff16565b8152602001908152602001600020600401612bf790919063ffffffff16565b505b6105bc816148c6565b9050610512565b508354640100000000900463ffffffff1660000361061a576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff861660048201526024015b60405180910390fd5b63ffffffff85166000818152600d6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000001690558051938452908301919091527ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651910160405180910390a150505050508061069e906148c6565b9050610492565b505050565b600e54606090640100000000900463ffffffff1660006106cb6001836148fe565b63ffffffff1667ffffffffffffffff8111156106e9576106e9613dd3565b60405190808252806020026020018201604052801561077057816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816107075790505b509050600060015b8363ffffffff168163ffffffff1610156107ec5763ffffffff8082166000908152600d602052604090205416156107dc576107b281612c03565b8383815181106107c4576107c4614868565b6020026020010181905250816107d9906148c6565b91505b6107e58161491b565b9050610778565b506107f86001846148fe565b63ffffffff168114610808578082525b5092915050565b60408051808201909152600081526060602082015263ffffffff82166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff16835260018101805491928401916108739061493e565b80601f016020809104026020016040519081016040528092919081815260200182805461089f9061493e565b80156108ec5780601f106108c1576101008083540402835291602001916108ec565b820191906000526020600020905b8154815290600101906020018083116108cf57829003601f168201915b5050505050815250509050919050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c081019190915261047482612c03565b610948612b5e565b60005b63ffffffff81168211156106a557600083838363ffffffff1681811061097357610973614868565b90506020020160208101906109889190614275565b63ffffffff81166000908152600b6020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681559192506109d36001830182613d66565b505060405163ffffffff8216907fa59268ca81d40429e65ccea5385b59cf2d3fc6519371dee92f8eb1dae5107a7a90600090a250610a108161491b565b905061094b565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb6576000848483818110610a5157610a51614868565b602090810292909201356000818152600c90935260409092206001810154929350919050610aae576040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260048101839052602401610611565b6000610abc82600401612be1565b1115610b1157610acf6004820184612beb565b6040517f60a6d89800000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260248101839052604401610611565b805468010000000000000000900463ffffffff1615610b795780546040517f60b9df730000000000000000000000000000000000000000000000000000000081526801000000000000000090910463ffffffff16600482015260248101839052604401610611565b83158015610bb35750805463ffffffff166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15610bec576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610611565b6001810154610bfd90600790612bf7565b506002810154610c0f90600990612bf7565b506000828152600c6020526040812080547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815560018101829055600281018290559060048201818181610c648282613da0565b5050505050507f5254e609a97bab37b7cc79fe128f85c097bd6015c6e1624ae0ba392eb975320582604051610c9b91815260200190565b60405180910390a1505080610caf906148c6565b9050610a35565b50505050565b610cc4612b5e565b60005b818110156106a5576000838383818110610ce357610ce3614868565b9050602002810190610cf59190614991565b610cfe906149cf565b805190915073ffffffffffffffffffffffffffffffffffffffff16610d4f576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e54604080518082018252835173ffffffffffffffffffffffffffffffffffffffff908116825260208086015181840190815263ffffffff9095166000818152600b909252939020825181547fffffffffffffffffffffffff00000000000000000000000000000000000000001692169190911781559251919290916001820190610ddb9082614a87565b5050600e8054909150600090610df69063ffffffff1661491b565b91906101000a81548163ffffffff021916908363ffffffff160217905550816000015173ffffffffffffffffffffffffffffffffffffffff168163ffffffff167f78e94ca80be2c30abc061b99e7eb8583b1254781734b1e3ce339abb57da2fe8e8460200151604051610e699190614024565b60405180910390a3505080610e7d906148c6565b9050610cc7565b63ffffffff8083166000908152600d60209081526040808320805464010000000090049094168084526001909401825280832085845260030190915281208054606093849390929091610ed69061493e565b80601f0160208091040260200160405190810160405280929190818152602001828054610f029061493e565b8015610f4f5780601f10610f2457610100808354040283529160200191610f4f565b820191906000526020600020905b815481529060010190602001808311610f3257829003601f168201915b5050506000888152600260208190526040909120015492935060609262010000900473ffffffffffffffffffffffffffffffffffffffff16159150611062905057600086815260026020819052604091829020015490517f8318ed5d00000000000000000000000000000000000000000000000000000000815263ffffffff891660048201526201000090910473ffffffffffffffffffffffffffffffffffffffff1690638318ed5d90602401600060405180830381865afa158015611019573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261105f9190810190614ba1565b90505b9093509150505b9250929050565b6040805160e0810182526000808252602082018190529181018290526060808201839052608082019290925260a0810182905260c08101919091526040805160e0810182526000848152600c6020908152838220805463ffffffff8082168652640100000000820481168487018190526801000000000000000090920416858701526001820154606086015260028201546080860152835260030190529190912060a082019061111f90612ed7565b8152602001611142600c6000868152602001908152602001600020600401612ed7565b905292915050565b611152612b5e565b60005b818110156106a557600083838381811061117157611171614868565b90506020020135905061118e816003612b4390919063ffffffff16565b6111c7576040517fe181733f00000000000000000000000000000000000000000000000000000000815260048101829052602401610611565b6111d2600582612ee4565b61120b576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815260048101829052602401610611565b60405181907fdcea1b78b6ddc31592a94607d537543fcaafda6cc52d6d5cc7bbfca1422baf2190600090a250611240816148c6565b9050611155565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb657600084848381811061128157611281614868565b90506020028101906112939190614c0f565b61129c90614c43565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff1682526001810180549596509394919390928401916112f29061493e565b80601f016020809104026020016040519081016040528092919081815260200182805461131e9061493e565b801561136b5780601f106113405761010080835404028352916020019161136b565b820191906000526020600020905b81548152906001019060200180831161134e57829003601f168201915b50505050508152505090508315801561139b5750805173ffffffffffffffffffffffffffffffffffffffff163314155b156113d4576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610611565b6040808301516000908152600c6020522060018101546114285782604001516040517fd82f6adb00000000000000000000000000000000000000000000000000000000815260040161061191815260200190565b6020830151611463576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154602084015181146114e457602084015161148490600790612b43565b156114bb576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602084015160018301556114d0600782612bf7565b5060208401516114e290600790612ee4565b505b6060840151805160000361152657806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106119190614d16565b8254600090849060049061154790640100000000900463ffffffff1661491b565b91906101000a81548163ffffffff021916908363ffffffff1602179055905060005b82518110156116345761159f83828151811061158757611587614868565b60200260200101516003612b4390919063ffffffff16565b6115d757826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106119190614d16565b6116238382815181106115ec576115ec614868565b60200260200101518660030160008563ffffffff1663ffffffff168152602001908152602001600020612ee490919063ffffffff16565b5061162d816148c6565b9050611569565b50835468010000000000000000900463ffffffff16801561179d5763ffffffff8082166000908152600d6020908152604080832080546401000000009004909416835260019093018152828220600201805484518184028101840190955280855292939290918301828280156116c957602002820191906000526020600020905b8154815260200190600101908083116116b5575b5050505050905060005b815181101561179a576117288282815181106116f1576116f1614868565b60200260200101518860030160008763ffffffff1663ffffffff168152602001908152602001600020612b4390919063ffffffff16565b61178a5781818151811061173e5761173e614868565b6020026020010151836040517f03dcd86200000000000000000000000000000000000000000000000000000000815260040161061192919091825263ffffffff16602082015260400190565b611793816148c6565b90506116d3565b50505b60006117ab86600401612ed7565b905060005b81518163ffffffff1610156118f9576000828263ffffffff16815181106117d9576117d9614868565b60209081029190910181015163ffffffff8082166000908152600d8452604080822080546401000000009004909316825260019092018452818120600201805483518187028101870190945280845293955090939192909183018282801561186057602002820191906000526020600020905b81548152602001906001019080831161184c575b5050505050905060005b81518110156118e5576118bf82828151811061188857611888614868565b60200260200101518b60030160008a63ffffffff1663ffffffff168152602001908152602001600020612b4390919063ffffffff16565b6118d55781818151811061173e5761173e614868565b6118de816148c6565b905061186a565b505050806118f29061491b565b90506117b0565b50875186547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff90911690811787556040808a0151600289018190556020808c01518351928352908201527f4b5b465e22eea0c3d40c30e936643245b80d19b2dcf75788c0699fe8d8db645b910160405180910390a2505050505050505080611986906148c6565b9050611265565b600e5460609063ffffffff1660006119a66001836148fe565b63ffffffff1667ffffffffffffffff8111156119c4576119c4613dd3565b604051908082528060200260200182016040528015611a0a57816020015b6040805180820190915260008152606060208201528152602001906001900390816119e25790505b509050600060015b8363ffffffff168163ffffffff161015611b625763ffffffff81166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff1615611b525763ffffffff81166000908152600b60209081526040918290208251808401909352805473ffffffffffffffffffffffffffffffffffffffff1683526001810180549192840191611aa69061493e565b80601f0160208091040260200160405190810160405280929190818152602001828054611ad29061493e565b8015611b1f5780601f10611af457610100808354040283529160200191611b1f565b820191906000526020600020905b815481529060010190602001808311611b0257829003601f168201915b505050505081525050838381518110611b3a57611b3a614868565b602002602001018190525081611b4f906148c6565b91505b611b5b8161491b565b9050611a12565b50600e546107f89060019063ffffffff166148fe565b611b80612b5e565b60005b818110156106a5576000838383818110611b9f57611b9f614868565b9050602002810190611bb19190614d5a565b611bba90614d9d565b90506000611bd082600001518360200151610446565b9050611bdd600382612ee4565b611c16576040517febf5255100000000000000000000000000000000000000000000000000000000815260048101829052602401610611565b611c208183612ef0565b505080611c2c906148c6565b9050611b83565b6000805473ffffffffffffffffffffffffffffffffffffffff163314905b82811015610cb6576000848483818110611c6d57611c6d614868565b9050602002810190611c7f9190614c0f565b611c8890614c43565b805163ffffffff166000908152600b602090815260408083208151808301909252805473ffffffffffffffffffffffffffffffffffffffff168252600181018054959650939491939092840191611cde9061493e565b80601f0160208091040260200160405190810160405280929190818152602001828054611d0a9061493e565b8015611d575780601f10611d2c57610100808354040283529160200191611d57565b820191906000526020600020905b815481529060010190602001808311611d3a57829003601f168201915b50505091909252505081519192505073ffffffffffffffffffffffffffffffffffffffff16611dbd5781516040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff9091166004820152602401610611565b83158015611de25750805173ffffffffffffffffffffffffffffffffffffffff163314155b15611e1b576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610611565b6040808301516000908152600c60205220600181015415611e705782604001516040517f5461848300000000000000000000000000000000000000000000000000000000815260040161061191815260200190565b6040830151611eb35782604001516040517f64e2ee9200000000000000000000000000000000000000000000000000000000815260040161061191815260200190565b60208301511580611ed057506020830151611ed090600790612b43565b15611f07576040517f8377314600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608301518051600003611f4957806040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106119190614d16565b81548290600490611f6790640100000000900463ffffffff1661491b565b82546101009290920a63ffffffff818102199093169183160217909155825464010000000090041660005b825181101561204557611fb083828151811061158757611587614868565b611fe857826040517f3748d4c60000000000000000000000000000000000000000000000000000000081526004016106119190614d16565b612034838281518110611ffd57611ffd614868565b60200260200101518560030160008563ffffffff1663ffffffff168152602001908152602001600020612ee490919063ffffffff16565b5061203e816148c6565b9050611f92565b50845183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9182161784556040860151600285015560208601516001850181905561209b9160079190612ee416565b5060408501516120ad90600990612ee4565b50845160408087015160208089015183519283529082015263ffffffff909216917f74becb12a5e8fd0e98077d02dfba8f647c9670c9df177e42c2418cf17a636f05910160405180910390a2505050505080612108906148c6565b9050611c51565b60015473ffffffffffffffffffffffffffffffffffffffff163314612190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610611565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b82811461224f576040517fab8b67c60000000000000000000000000000000000000000000000000000000081526004810184905260248101829052604401610611565b6000805473ffffffffffffffffffffffffffffffffffffffff16905b8481101561254a57600086868381811061228757612287614868565b905060200201602081019061229c9190614275565b63ffffffff81166000908152600b6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff1661230b576040517fadd9ae1e00000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152602401610611565b600086868581811061231f5761231f614868565b90506020028101906123319190614991565b61233a906149cf565b805190915073ffffffffffffffffffffffffffffffffffffffff1661238b576040517feeacd93900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff1633148015906123c857503373ffffffffffffffffffffffffffffffffffffffff861614155b15612401576040517f9473075d000000000000000000000000000000000000000000000000000000008152336004820152602401610611565b8051825473ffffffffffffffffffffffffffffffffffffffff908116911614158061247d575060208082015160405161243a9201614024565b60405160208183030381529060405280519060200120826001016040516020016124649190614e43565b6040516020818303038152906040528051906020012014155b1561253657805182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602081015160018301906124d79082614a87565b50806000015173ffffffffffffffffffffffffffffffffffffffff168363ffffffff167f86f41145bde5dd7f523305452e4aad3685508c181432ec733d5f345009358a28836020015160405161252d9190614024565b60405180910390a35b50505080612543906148c6565b905061226b565b505050505050565b6125936040805160e0810182526000808252606060208301819052928201839052909182019081526020016000815260006020820181905260409091015290565b6040805160e081018252838152600084815260026020908152929020805491928301916125bf9061493e565b80601f01602080910402602001604051908101604052809291908181526020018280546125eb9061493e565b80156126385780601f1061260d57610100808354040283529160200191612638565b820191906000526020600020905b81548152906001019060200180831161261b57829003601f168201915b505050505081526020016002600085815260200190815260200160002060010180546126639061493e565b80601f016020809104026020016040519081016040528092919081815260200182805461268f9061493e565b80156126dc5780601f106126b1576101008083540402835291602001916126dc565b820191906000526020600020905b8154815290600101906020018083116126bf57829003601f168201915b50505091835250506000848152600260208181526040909220015491019060ff16600381111561270e5761270e6144d4565b815260008481526002602081815260409092200154910190610100900460ff16600181111561273f5761273f6144d4565b81526000848152600260208181526040928390209091015462010000900473ffffffffffffffffffffffffffffffffffffffff169083015201612783600585612b43565b1515905292915050565b612795612b5e565b63ffffffff8089166000908152600d60205260408120546401000000009004909116908190036127f9576040517f2b62be9b00000000000000000000000000000000000000000000000000000000815263ffffffff8a166004820152602401610611565b61284b888888886040518060a001604052808f63ffffffff168152602001876128219061491b565b97508763ffffffff1681526020018a1515815260200189151581526020018860ff16815250613184565b505050505050505050565b61285e612b5e565b600e805460009164010000000090910463ffffffff169060046128808361491b565b82546101009290920a63ffffffff81810219909316918316021790915581166000818152600d602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001684179055815160a08101835292835260019083015286151590820152841515606082015260ff84166080820152909150612916908990899089908990613184565b5050505050505050565b6060600061292e6003612ed7565b90506000815167ffffffffffffffff81111561294c5761294c613dd3565b6040519080825280602002602001820160405280156129be57816020015b6129ab6040805160e0810182526000808252606060208301819052928201839052909182019081526020016000815260006020820181905260409091015290565b81526020019060019003908161296a5790505b50905060005b8251811015610808576129ef8382815181106129e2576129e2614868565b6020026020010151612552565b828281518110612a0157612a01614868565b602002602001018190525080612a16906148c6565b90506129c4565b60606000612a2b6009612ed7565b90506000815167ffffffffffffffff811115612a4957612a49613dd3565b604051908082528060200260200182016040528015612ad057816020015b6040805160e081018252600080825260208083018290529282018190526060808301829052608083019190915260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181612a675790505b50905060005b825181101561080857612b01838281518110612af457612af4614868565b6020026020010151611070565b828281518110612b1357612b13614868565b602002602001018190525080612b28906148c6565b9050612ad6565b612b37612b5e565b612b40816139c8565b50565b600081815260018301602052604081205415155b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612bdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610611565b565b6000610474825490565b6000612b578383613abd565b6000612b578383613ae7565b6040805160e0810182526000808252602080830182905282840182905260608084018390526080840183905260a0840181905260c084015263ffffffff8581168352600d8252848320805464010000000090049091168084526001909101825284832060028101805487518186028101860190985280885295969295919493909190830182828015612cb457602002820191906000526020600020905b815481526020019060010190808311612ca0575b505050505090506000815167ffffffffffffffff811115612cd757612cd7613dd3565b604051908082528060200260200182016040528015612d1d57816020015b604080518082019091526000815260606020820152815260200190600190039081612cf55790505b50905060005b8151811015612e3e576040518060400160405280848381518110612d4957612d49614868565b60200260200101518152602001856003016000868581518110612d6e57612d6e614868565b602002602001015181526020019081526020016000208054612d8f9061493e565b80601f0160208091040260200160405190810160405280929190818152602001828054612dbb9061493e565b8015612e085780601f10612ddd57610100808354040283529160200191612e08565b820191906000526020600020905b815481529060010190602001808311612deb57829003601f168201915b5050505050815250828281518110612e2257612e22614868565b602002602001018190525080612e37906148c6565b9050612d23565b506040805160e08101825263ffffffff8089166000818152600d6020818152868320548086168752948b168187015260ff680100000000000000008604811697870197909752690100000000000000000085048716151560608701529290915290526a010000000000000000000090049091161515608082015260a08101612ec585612ed7565b81526020019190915295945050505050565b60606000612b5783613bda565b6000612b578383613c36565b608081015173ffffffffffffffffffffffffffffffffffffffff161561303e57608081015173ffffffffffffffffffffffffffffffffffffffff163b1580612fe9575060808101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f78bea72100000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff909116906301ffc9a790602401602060405180830381865afa158015612fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fe79190614eec565b155b1561303e5760808101516040517fabb5e3fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610611565b60008281526002602052604090208151829190819061305d9082614a87565b50602082015160018201906130729082614a87565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360038111156130b4576130b46144d4565b021790555060608201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360018111156130fb576130fb6144d4565b0217905550608091909101516002909101805473ffffffffffffffffffffffffffffffffffffffff90921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405182907f04f0a9bcf3f3a3b42a4d7ca081119755f82ebe43e0d30c8f7292c4fe0dc4a2ae90600090a25050565b805163ffffffff9081166000908152600d602090815260408083208286015190941683526001909301905220608082015160ff1615806131d65750608082015185906131d1906001614f09565b60ff16115b1561321f5760808201516040517f25b4d61800000000000000000000000000000000000000000000000000000000815260ff909116600482015260248101869052604401610611565b6001826020015163ffffffff16111561330f57815163ffffffff166000908152600d60209081526040822090840151600191820191839161326091906148fe565b63ffffffff1663ffffffff168152602001908152602001600020905060005b61328882612be1565b81101561330c576132b7846000015163ffffffff16600c60006105928587600001612beb90919063ffffffff16565b50600c60006132c68484612beb565b8152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff169055613305816148c6565b905061327f565b50505b60005b858110156135515761333f87878381811061332f5761332f614868565b8592602090910201359050612ee4565b6133a057825187878381811061335757613357614868565b6040517f636e405700000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610611565b8260600151156134f757825163ffffffff16600c60008989858181106133c8576133c8614868565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff16148015906134425750600c600088888481811061341357613413614868565b602090810292909201358352508101919091526040016000205468010000000000000000900463ffffffff1615155b156134a457825187878381811061345b5761345b614868565b6040517f60b9df7300000000000000000000000000000000000000000000000000000000815263ffffffff90941660048501526020029190910135602483015250604401610611565b8251600c60008989858181106134bc576134bc614868565b90506020020135815260200190815260200160002060000160086101000a81548163ffffffff021916908363ffffffff160217905550613541565b825161353f9063ffffffff16600c60008a8a8681811061351957613519614868565b905060200201358152602001908152602001600020600401612ee490919063ffffffff16565b505b61354a816148c6565b9050613312565b5060005b8381101561383d573685858381811061357057613570614868565b90506020028101906135829190614991565b905061359060038235612b43565b6135c9576040517fe181733f00000000000000000000000000000000000000000000000000000000815281356004820152602401610611565b6135d560058235612b43565b1561360f576040517ff7d7a29400000000000000000000000000000000000000000000000000000000815281356004820152602401610611565b803560009081526003840160205260408120805461362c9061493e565b905011156136785783516040517f3927d08000000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015281356024820152604401610611565b60005b8781101561378a5761371f8235600c60008c8c8681811061369e5761369e614868565b9050602002013581526020019081526020016000206003016000600c60008e8e888181106136ce576136ce614868565b90506020020135815260200190815260200160002060000160049054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020612b4390919063ffffffff16565b61377a5788888281811061373557613735614868565b6040517fa7e792500000000000000000000000000000000000000000000000000000000081526020909102929092013560048301525082356024820152604401610611565b613783816148c6565b905061367b565b50600283018054600181018255600091825260209182902083359101556137b390820182614f22565b823560009081526003860160205260409020916137d1919083614f87565b50835160208086015161382c92918435908c908c906137f290880188614f22565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613c8592505050565b50613836816148c6565b9050613555565b50604080830151835163ffffffff9081166000908152600d602090815284822080549415156901000000000000000000027fffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffff90951694909417909355606086015186518316825284822080549115156a0100000000000000000000027fffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffff9092169190911790556080860151865183168252848220805460ff9290921668010000000000000000027fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff909216919091179055918501805186518316845292849020805493909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9093169290921790558351905191517ff264aae70bf6a9d90e68e0f9b393f4e7fbea67b063b0f336e0b36c1581703651926139b8929163ffffffff92831681529116602082015260400190565b60405180910390a1505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613a47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610611565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110613ad457613ad4614868565b9060005260206000200154905092915050565b60008181526001830160205260408120548015613bd0576000613b0b6001836150a2565b8554909150600090613b1f906001906150a2565b9050818114613b84576000866000018281548110613b3f57613b3f614868565b9060005260206000200154905080876000018481548110613b6257613b62614868565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b9557613b956150b5565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610474565b6000915050610474565b606081600001805480602002602001604051908101604052809291908181526020018280548015613c2a57602002820191906000526020600020905b815481526020019060010190808311613c16575b50505050509050919050565b6000818152600183016020526040812054613c7d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610474565b506000610474565b6000848152600260208190526040909120015462010000900473ffffffffffffffffffffffffffffffffffffffff161561254a57600084815260026020819052604091829020015490517ffba64a7c0000000000000000000000000000000000000000000000000000000081526201000090910473ffffffffffffffffffffffffffffffffffffffff169063fba64a7c90613d2c908690869086908b908d906004016150e4565b600060405180830381600087803b158015613d4657600080fd5b505af1158015613d5a573d6000803e3d6000fd5b50505050505050505050565b508054613d729061493e565b6000825580601f10613d82575050565b601f016020900490600052602060002090810190612b409190613dba565b5080546000825590600052602060002090810190612b4091905b5b80821115613dcf5760008155600101613dbb565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715613e2557613e25613dd3565b60405290565b60405160a0810167ffffffffffffffff81118282101715613e2557613e25613dd3565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613e9557613e95613dd3565b604052919050565b600067ffffffffffffffff821115613eb757613eb7613dd3565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112613ef457600080fd5b8135613f07613f0282613e9d565b613e4e565b818152846020838601011115613f1c57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613f4c57600080fd5b823567ffffffffffffffff80821115613f6457600080fd5b613f7086838701613ee3565b93506020850135915080821115613f8657600080fd5b50613f9385828601613ee3565b9150509250929050565b600060208284031215613faf57600080fd5b5035919050565b60005b83811015613fd1578181015183820152602001613fb9565b50506000910152565b60008151808452613ff2816020860160208601613fb6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612b576020830184613fda565b60008083601f84011261404957600080fd5b50813567ffffffffffffffff81111561406157600080fd5b6020830191508360208260051b850101111561106957600080fd5b6000806020838503121561408f57600080fd5b823567ffffffffffffffff8111156140a657600080fd5b6140b285828601614037565b90969095509350505050565b600081518084526020808501945080840160005b838110156140ee578151875295820195908201906001016140d2565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b85811015614155578284038952815180518552850151604086860181905261414181870183613fda565b9a87019a9550505090840190600101614117565b5091979650505050505050565b600063ffffffff8083511684528060208401511660208501525060ff604083015116604084015260608201511515606084015260808201511515608084015260a082015160e060a08501526141ba60e08501826140be565b905060c083015184820360c08601526141d382826140f9565b95945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561424f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261423d858351614162565b94509285019290850190600101614203565b5092979650505050505050565b803563ffffffff8116811461427057600080fd5b919050565b60006020828403121561428757600080fd5b612b578261425c565b73ffffffffffffffffffffffffffffffffffffffff815116825260006020820151604060208501526142c56040850182613fda565b949350505050565b602081526000612b576020830184614290565b602081526000612b576020830184614162565b6000806040838503121561430657600080fd5b61430f8361425c565b946020939093013593505050565b6040815260006143306040830185613fda565b82810360208401526141d38185613fda565b600063ffffffff808351168452602081818501511681860152816040850151166040860152606084015160608601526080840151608086015260a0840151915060e060a086015261439660e08601836140be565b60c08581015187830391880191909152805180835290830193506000918301905b808310156143d757845182529383019360019290920191908301906143b7565b509695505050505050565b602081526000612b576020830184614342565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561424f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452614456858351614290565b9450928501929085019060010161441c565b6000806000806040858703121561447e57600080fd5b843567ffffffffffffffff8082111561449657600080fd5b6144a288838901614037565b909650945060208701359150808211156144bb57600080fd5b506144c887828801614037565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b805182526000602082015160e0602085015261452260e0850182613fda565b90506040830151848203604086015261453b8282613fda565b915050606083015160048110614553576145536144d4565b606085015260808301516002811061456d5761456d6144d4565b8060808601525060a083015161459b60a086018273ffffffffffffffffffffffffffffffffffffffff169052565b5060c08301516145af60c086018215159052565b509392505050565b602081526000612b576020830184614503565b8015158114612b4057600080fd5b803560ff8116811461427057600080fd5b60008060008060008060008060c0898b03121561460557600080fd5b61460e8961425c565b9750602089013567ffffffffffffffff8082111561462b57600080fd5b6146378c838d01614037565b909950975060408b013591508082111561465057600080fd5b5061465d8b828c01614037565b9096509450506060890135614671816145ca565b92506080890135614681816145ca565b915061468f60a08a016145d8565b90509295985092959890939650565b600080600080600080600060a0888a0312156146b957600080fd5b873567ffffffffffffffff808211156146d157600080fd5b6146dd8b838c01614037565b909950975060208a01359150808211156146f657600080fd5b506147038a828b01614037565b9096509450506040880135614717816145ca565b92506060880135614727816145ca565b9150614735608089016145d8565b905092959891949750929550565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561424f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526147a4858351614503565b9450928501929085019060010161476a565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561424f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452614817858351614342565b945092850192908501906001016147dd565b803573ffffffffffffffffffffffffffffffffffffffff8116811461427057600080fd5b60006020828403121561485f57600080fd5b612b5782614829565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036148f7576148f7614897565b5060010190565b63ffffffff82811682821603908082111561080857610808614897565b600063ffffffff80831681810361493457614934614897565b6001019392505050565b600181811c9082168061495257607f821691505b60208210810361498b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126149c557600080fd5b9190910192915050565b6000604082360312156149e157600080fd5b6040516040810167ffffffffffffffff8282108183111715614a0557614a05613dd3565b81604052614a1285614829565b83526020850135915080821115614a2857600080fd5b50614a3536828601613ee3565b60208301525092915050565b601f8211156106a557600081815260208120601f850160051c81016020861015614a685750805b601f850160051c820191505b8181101561254a57828155600101614a74565b815167ffffffffffffffff811115614aa157614aa1613dd3565b614ab581614aaf845461493e565b84614a41565b602080601f831160018114614b085760008415614ad25750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561254a565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015614b5557888601518255948401946001909101908401614b36565b5085821015614b9157878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614bb357600080fd5b815167ffffffffffffffff811115614bca57600080fd5b8201601f81018413614bdb57600080fd5b8051614be9613f0282613e9d565b818152856020838501011115614bfe57600080fd5b6141d3826020830160208601613fb6565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818336030181126149c557600080fd5b600060808236031215614c5557600080fd5b614c5d613e02565b614c668361425c565b81526020808401358183015260408401356040830152606084013567ffffffffffffffff80821115614c9757600080fd5b9085019036601f830112614caa57600080fd5b813581811115614cbc57614cbc613dd3565b8060051b9150614ccd848301613e4e565b8181529183018401918481019036841115614ce757600080fd5b938501935b83851015614d0557843582529385019390850190614cec565b606087015250939695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015614d4e57835183529284019291840191600101614d32565b50909695505050505050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff618336030181126149c557600080fd5b80356002811061427057600080fd5b600060a08236031215614daf57600080fd5b614db7613e2b565b823567ffffffffffffffff80821115614dcf57600080fd5b614ddb36838701613ee3565b83526020850135915080821115614df157600080fd5b50614dfe36828601613ee3565b602083015250604083013560048110614e1657600080fd5b6040820152614e2760608401614d8e565b6060820152614e3860808401614829565b608082015292915050565b6000602080835260008454614e578161493e565b80848701526040600180841660008114614e785760018114614eb057614ede565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614ede565b896000528660002060005b85811015614ed65781548b8201860152908301908801614ebb565b8a0184019650505b509398975050505050505050565b600060208284031215614efe57600080fd5b8151612b57816145ca565b60ff818116838216019081111561047457610474614897565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614f5757600080fd5b83018035915067ffffffffffffffff821115614f7257600080fd5b60200191503681900382131561106957600080fd5b67ffffffffffffffff831115614f9f57614f9f613dd3565b614fb383614fad835461493e565b83614a41565b6000601f8411600181146150055760008515614fcf5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b17835561509b565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156150545786850135825560209485019460019092019101615034565b508682101561508f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b8181038181111561047457610474614897565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6080815284608082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86111561511d57600080fd5b8560051b808860a0850137820182810360a0908101602085015261514390820187613fda565b91505063ffffffff8085166040840152808416606084015250969550505050505056fea164736f6c6343000813000a", } var CapabilitiesRegistryABI = CapabilitiesRegistryMetaData.ABI @@ -216,55 +226,47 @@ func (_CapabilitiesRegistry *CapabilitiesRegistryTransactorRaw) Transact(opts *b return _CapabilitiesRegistry.Contract.contract.Transact(opts, method, params...) } -func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetCapabilities(opts *bind.CallOpts) (GetCapabilities, - - error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetCapabilities(opts *bind.CallOpts) ([]CapabilitiesRegistryCapabilityInfo, error) { var out []interface{} err := _CapabilitiesRegistry.contract.Call(opts, &out, "getCapabilities") - outstruct := new(GetCapabilities) if err != nil { - return *outstruct, err + return *new([]CapabilitiesRegistryCapabilityInfo), err } - outstruct.HashedCapabilityIds = *abi.ConvertType(out[0], new([][32]byte)).(*[][32]byte) - outstruct.Capabilities = *abi.ConvertType(out[1], new([]CapabilitiesRegistryCapability)).(*[]CapabilitiesRegistryCapability) + out0 := *abi.ConvertType(out[0], new([]CapabilitiesRegistryCapabilityInfo)).(*[]CapabilitiesRegistryCapabilityInfo) - return *outstruct, err + return out0, err } -func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetCapabilities() (GetCapabilities, - - error) { +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetCapabilities() ([]CapabilitiesRegistryCapabilityInfo, error) { return _CapabilitiesRegistry.Contract.GetCapabilities(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetCapabilities() (GetCapabilities, - - error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetCapabilities() ([]CapabilitiesRegistryCapabilityInfo, error) { return _CapabilitiesRegistry.Contract.GetCapabilities(&_CapabilitiesRegistry.CallOpts) } -func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilitiesRegistryCapability, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCaller) GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilitiesRegistryCapabilityInfo, error) { var out []interface{} err := _CapabilitiesRegistry.contract.Call(opts, &out, "getCapability", hashedId) if err != nil { - return *new(CapabilitiesRegistryCapability), err + return *new(CapabilitiesRegistryCapabilityInfo), err } - out0 := *abi.ConvertType(out[0], new(CapabilitiesRegistryCapability)).(*CapabilitiesRegistryCapability) + out0 := *abi.ConvertType(out[0], new(CapabilitiesRegistryCapabilityInfo)).(*CapabilitiesRegistryCapabilityInfo) return out0, err } -func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetCapability(hashedId [32]byte) (CapabilitiesRegistryCapability, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistrySession) GetCapability(hashedId [32]byte) (CapabilitiesRegistryCapabilityInfo, error) { return _CapabilitiesRegistry.Contract.GetCapability(&_CapabilitiesRegistry.CallOpts, hashedId) } -func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetCapability(hashedId [32]byte) (CapabilitiesRegistryCapability, error) { +func (_CapabilitiesRegistry *CapabilitiesRegistryCallerSession) GetCapability(hashedId [32]byte) (CapabilitiesRegistryCapabilityInfo, error) { return _CapabilitiesRegistry.Contract.GetCapability(&_CapabilitiesRegistry.CallOpts, hashedId) } @@ -2087,11 +2089,6 @@ func (_CapabilitiesRegistry *CapabilitiesRegistryFilterer) ParseOwnershipTransfe return event, nil } -type GetCapabilities struct { - HashedCapabilityIds [][32]byte - Capabilities []CapabilitiesRegistryCapability -} - func (_CapabilitiesRegistry *CapabilitiesRegistry) ParseLog(log types.Log) (generated.AbigenLog, error) { switch log.Topics[0] { case _CapabilitiesRegistry.abi.Events["CapabilityConfigured"].ID: @@ -2171,11 +2168,9 @@ func (_CapabilitiesRegistry *CapabilitiesRegistry) Address() common.Address { } type CapabilitiesRegistryInterface interface { - GetCapabilities(opts *bind.CallOpts) (GetCapabilities, - - error) + GetCapabilities(opts *bind.CallOpts) ([]CapabilitiesRegistryCapabilityInfo, error) - GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilitiesRegistryCapability, error) + GetCapability(opts *bind.CallOpts, hashedId [32]byte) (CapabilitiesRegistryCapabilityInfo, error) GetCapabilityConfigs(opts *bind.CallOpts, donId uint32, capabilityId [32]byte) ([]byte, []byte, error) diff --git a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt index 4a0d0d7c5a0..1839ed8cb85 100644 --- a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -1,4 +1,4 @@ GETH_VERSION: 1.13.8 -capabilities_registry: ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.abi ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.bin 3a42a29db3b81e03f7fad6d872fa2182949643d8c1ed62c34a6af7520583eba4 +capabilities_registry: ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.abi ../../../contracts/solc/v0.8.19/CapabilitiesRegistry/CapabilitiesRegistry.bin 010d0b7796300bfe2ab4bc7098d1bebbaf124bd75c5e8e36310dbef8bf532a17 forwarder: ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin bd15b7c5cecc87d44cac0b8414627cfb2c0e1cdd554df60a50dcb682f9a05129 ocr3_capability: ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin 144f23145878b95d1672e4919874eddeeaa38ce520d0edbe72c6677e39bb4741 From e56d5d6041bb3bb9a4f2caca33a2f33eb1f5fa91 Mon Sep 17 00:00:00 2001 From: ilija42 <57732589+ilija42@users.noreply.github.com> Date: Tue, 18 Jun 2024 12:24:02 +0200 Subject: [PATCH 14/14] BCF-3258 - Fix QueryKey test case flakiness (#13529) * Fix QueryKey test case flakiness * Handle Aptos not needing a CoreRelayerChainInteroperator --- core/chains/evm/logpoller/parser.go | 3 ++- core/chains/evm/logpoller/parser_test.go | 17 +++++++++-------- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- .../relayer_chain_interoperators_test.go | 3 +++ core/services/job/orm.go | 3 +++ go.mod | 2 +- go.sum | 4 ++-- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 ++-- 12 files changed, 29 insertions(+), 21 deletions(-) diff --git a/core/chains/evm/logpoller/parser.go b/core/chains/evm/logpoller/parser.go index 3860fb2ff12..e08ea93da73 100644 --- a/core/chains/evm/logpoller/parser.go +++ b/core/chains/evm/logpoller/parser.go @@ -21,6 +21,7 @@ const ( timestampFieldName = "block_timestamp" txHashFieldName = "tx_hash" eventSigFieldName = "event_sig" + defaultSort = "block_number DESC, log_index DESC" ) var ( @@ -305,7 +306,7 @@ func (v *pgDSLParser) orderClause(limiter query.LimitAndSort) (string, error) { } if len(sorting) == 0 { - return "", nil + return fmt.Sprintf("ORDER BY %s", defaultSort), nil } sort := make([]string, len(sorting)) diff --git a/core/chains/evm/logpoller/parser_test.go b/core/chains/evm/logpoller/parser_test.go index a12455ea5dd..5e99ec7ba82 100644 --- a/core/chains/evm/logpoller/parser_test.go +++ b/core/chains/evm/logpoller/parser_test.go @@ -34,7 +34,7 @@ func TestDSLParser(t *testing.T) { result, args, err := parser.buildQuery(chainID, expressions, limiter) require.NoError(t, err) - assert.Equal(t, "SELECT evm.logs.* FROM evm.logs WHERE evm_chain_id = :evm_chain_id", result) + assert.Equal(t, "SELECT evm.logs.* FROM evm.logs WHERE evm_chain_id = :evm_chain_id ORDER BY "+defaultSort, result) assertArgs(t, args, 1) }) @@ -84,6 +84,7 @@ func TestDSLParser(t *testing.T) { "FROM evm.logs " + "WHERE evm_chain_id = :evm_chain_id " + "AND (address = :address_0 AND event_sig = :event_sig_0) " + + "ORDER BY " + defaultSort + " " + "LIMIT 20" require.NoError(t, err) @@ -177,7 +178,7 @@ func TestDSLParser(t *testing.T) { expected := "SELECT evm.logs.* " + "FROM evm.logs " + "WHERE evm_chain_id = :evm_chain_id " + - "AND block_number <= (SELECT finalized_block_number FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1)" + "AND block_number <= (SELECT finalized_block_number FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1) ORDER BY " + defaultSort require.NoError(t, err) assert.Equal(t, expected, result) @@ -196,7 +197,7 @@ func TestDSLParser(t *testing.T) { expected := "SELECT evm.logs.* " + "FROM evm.logs " + "WHERE evm_chain_id = :evm_chain_id " + - "AND block_number <= (SELECT greatest(block_number - :confs_0, 0) FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1)" + "AND block_number <= (SELECT greatest(block_number - :confs_0, 0) FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1) ORDER BY " + defaultSort require.NoError(t, err) assert.Equal(t, expected, result) @@ -215,7 +216,7 @@ func TestDSLParser(t *testing.T) { expected := "SELECT evm.logs.* " + "FROM evm.logs " + "WHERE evm_chain_id = :evm_chain_id " + - "AND block_number <= (SELECT greatest(block_number - :confs_0, 0) FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1)" + "AND block_number <= (SELECT greatest(block_number - :confs_0, 0) FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1) ORDER BY " + defaultSort require.NoError(t, err) assert.Equal(t, expected, result) @@ -245,7 +246,7 @@ func TestDSLParser(t *testing.T) { expected := "SELECT evm.logs.* " + "FROM evm.logs " + "WHERE evm_chain_id = :evm_chain_id " + - "AND substring(data from 32*:word_index_0+1 for 32) > :word_value_0" + "AND substring(data from 32*:word_index_0+1 for 32) > :word_value_0 ORDER BY " + defaultSort require.NoError(t, err) assert.Equal(t, expected, result) @@ -270,7 +271,7 @@ func TestDSLParser(t *testing.T) { expected := "SELECT evm.logs.* " + "FROM evm.logs " + "WHERE evm_chain_id = :evm_chain_id " + - "AND topics[:topic_index_0] > :topic_value_0 AND topics[:topic_index_0] < :topic_value_1" + "AND topics[:topic_index_0] > :topic_value_0 AND topics[:topic_index_0] < :topic_value_1 ORDER BY " + defaultSort require.NoError(t, err) assert.Equal(t, expected, result) @@ -308,7 +309,7 @@ func TestDSLParser(t *testing.T) { "WHERE evm_chain_id = :evm_chain_id " + "AND (block_timestamp >= :block_timestamp_0 " + "AND (tx_hash = :tx_hash_0 " + - "OR block_number <= (SELECT greatest(block_number - :confs_0, 0) FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1)))" + "OR block_number <= (SELECT greatest(block_number - :confs_0, 0) FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1))) ORDER BY " + defaultSort require.NoError(t, err) assert.Equal(t, expected, result) @@ -359,7 +360,7 @@ func TestDSLParser(t *testing.T) { "AND (tx_hash = :tx_hash_0 " + "OR (block_number <= (SELECT greatest(block_number - :confs_0, 0) FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1) " + "AND substring(data from 32*:word_index_0+1 for 32) > :word_value_0 " + - "AND substring(data from 32*:word_index_0+1 for 32) <= :word_value_1)))" + "AND substring(data from 32*:word_index_0+1 for 32) <= :word_value_1))) ORDER BY " + defaultSort require.NoError(t, err) assert.Equal(t, expected, result) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 48a21fc7129..4da575d57c7 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -24,7 +24,7 @@ require ( github.com/prometheus/client_golang v1.17.0 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 8b84e304b2b..d44756a8e1d 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1212,8 +1212,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af h1:YVw8iLZJEj9cJQGX1wggB9Lv1liMnudGvR1eC3CsWrg= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da h1:s3wq2II/FQ1YNcPWnvp44A7Nc874bkMicrkXNpNNHs4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= diff --git a/core/services/chainlink/relayer_chain_interoperators_test.go b/core/services/chainlink/relayer_chain_interoperators_test.go index c2baa1edcde..5152a042280 100644 --- a/core/services/chainlink/relayer_chain_interoperators_test.go +++ b/core/services/chainlink/relayer_chain_interoperators_test.go @@ -368,6 +368,9 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { expectedChainCnt, expectedNodeCnt = tt.expectedSolanaChainCnt, tt.expectedSolanaNodeCnt case types.NetworkStarkNet: expectedChainCnt, expectedNodeCnt = tt.expectedStarknetChainCnt, tt.expectedStarknetNodeCnt + case types.NetworkAptos: + t.Skip("aptos doesn't need a CoreRelayerChainInteroperator") + default: require.Fail(t, "untested relay network", relayNetwork) } diff --git a/core/services/job/orm.go b/core/services/job/orm.go index 4ef847c6225..d08fce1b85d 100644 --- a/core/services/job/orm.go +++ b/core/services/job/orm.go @@ -600,6 +600,9 @@ func validateKeyStoreMatchForRelay(ctx context.Context, network string, keyStore if err != nil { return errors.Errorf("no Starknet key matching: %q", key) } + case types.NetworkAptos: + // TODO BCI-2953 + return nil } return nil } diff --git a/go.mod b/go.mod index 949a999afc4..00d3a167d2e 100644 --- a/go.mod +++ b/go.mod @@ -72,7 +72,7 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chain-selectors v1.0.10 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 diff --git a/go.sum b/go.sum index 9a87f856d1c..c479b1a5e8c 100644 --- a/go.sum +++ b/go.sum @@ -1171,8 +1171,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af h1:YVw8iLZJEj9cJQGX1wggB9Lv1liMnudGvR1eC3CsWrg= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da h1:s3wq2II/FQ1YNcPWnvp44A7Nc874bkMicrkXNpNNHs4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index c3257029ace..a4cef0a8dad 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -27,7 +27,7 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da github.com/smartcontractkit/chainlink-testing-framework v1.30.9 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index c7792ef3193..56792b551cf 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1512,8 +1512,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af h1:YVw8iLZJEj9cJQGX1wggB9Lv1liMnudGvR1eC3CsWrg= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da h1:s3wq2II/FQ1YNcPWnvp44A7Nc874bkMicrkXNpNNHs4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 6858bcc7fd9..f65a0839f7c 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -16,7 +16,7 @@ require ( github.com/rs/zerolog v1.30.0 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da github.com/smartcontractkit/chainlink-testing-framework v1.30.9 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240214231432-4ad5eb95178c github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240216210048-da02459ddad8 diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index f27109b799e..c9e3c2f2a14 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1502,8 +1502,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af h1:YVw8iLZJEj9cJQGX1wggB9Lv1liMnudGvR1eC3CsWrg= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240614134652-1fb0b48758af/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da h1:s3wq2II/FQ1YNcPWnvp44A7Nc874bkMicrkXNpNNHs4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240617140013-160ae09880da/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=