From 8f35d8eb3d4efb17b2ddfed58ea283dc5946c2c8 Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Fri, 26 Aug 2022 16:42:46 +0200 Subject: [PATCH] Initial commit --- .github/workflows/generic.yaml | 46 + CODEOWNERS | 2 + LICENSE | 191 +++ apply-license.sh | 21 + bindings.go | 2401 ++++++++++++++++++++++++++++++++ check-license.sh | 24 + generate-bindings.sh | 51 + generate.go | 18 + go.mod | 23 + go.sum | 53 + 10 files changed, 2830 insertions(+) create mode 100644 .github/workflows/generic.yaml create mode 100644 CODEOWNERS create mode 100644 LICENSE create mode 100755 apply-license.sh create mode 100644 bindings.go create mode 100755 check-license.sh create mode 100755 generate-bindings.sh create mode 100644 generate.go create mode 100644 go.mod create mode 100644 go.sum diff --git a/.github/workflows/generic.yaml b/.github/workflows/generic.yaml new file mode 100644 index 0000000..a31ee52 --- /dev/null +++ b/.github/workflows/generic.yaml @@ -0,0 +1,46 @@ +# Copyright 2022 Stichting ThingsIX Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +name: 'Generic Checks' + +on: + pull_request: + branches: + - main + +jobs: + license: + name: Check if all files contain license header + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.19.2 + - name: Install addlicense + run: go install github.com/google/addlicense@53d978ad7e086016cadd4beb6f8a92d73fde9ad0 + - name: Check out code + uses: actions/checkout@v3 + - name: Check license headers + run: ./check-license.sh + check-commit-message-style: + name: Check commit message + runs-on: ubuntu-latest + steps: + - name: Check + uses: mristin/opinionated-commit-message@v3.0.0 + with: + allow-one-liners: 'true' diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..f139dde --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,2 @@ +* @bas-vk +* @timcooijmans diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b70e4ca --- /dev/null +++ b/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2018 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/apply-license.sh b/apply-license.sh new file mode 100755 index 0000000..bf8dd18 --- /dev/null +++ b/apply-license.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Copyright 2022 Stichting ThingsIX Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + + +# Adds a license to all code files, requires the https://github.com/google/addlicense tool to be installed, add ignores for code that doesn't need a license. +# Example for Go: addlicense -c "Stichting ThingsIX Foundation" -s -ignore "external/**" . +addlicense -c "Stichting ThingsIX Foundation" -s . \ No newline at end of file diff --git a/bindings.go b/bindings.go new file mode 100644 index 0000000..729bd7e --- /dev/null +++ b/bindings.go @@ -0,0 +1,2401 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package gateway_registry + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// IGatewayRegistryGateway is an auto generated low-level Go binding around an user-defined struct. +type IGatewayRegistryGateway struct { + PublicKey [32]byte + Version uint8 + Owner common.Address + AntennaGain uint8 + FrequencyPlan uint8 + Location int64 + Altitude uint8 +} + +// GatewayRegistryMetaData contains all meta data concerning the GatewayRegistry contract. +var GatewayRegistryMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"manager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"FrequencyPlanAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"FrequencyPlanRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"gatewayId\",\"type\":\"bytes32\"}],\"name\":\"GatewayOffboarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"gatewayId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"GatewayOnboarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"onboards\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"offboards\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"updates\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"transfers\",\"type\":\"bool\"}],\"name\":\"GatewayRegistryPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"gatewayId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"GatewayTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"gatewayId\",\"type\":\"bytes32\"}],\"name\":\"GatewayUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GATEWAY_OFFBOARD_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GATEWAY_ONBOARDER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GATEWAY_TRANSFER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GATEWAY_UPDATER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRUSTED_FORWARDER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"fp\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"addFrequencyPlan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"}],\"name\":\"destroy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"frequencyPlans\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"gatewayCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"gatewayOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"gateways\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"publicKey\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"antennaGain\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"frequencyPlan\",\"type\":\"uint8\"},{\"internalType\":\"int64\",\"name\":\"location\",\"type\":\"int64\"},{\"internalType\":\"uint8\",\"name\":\"altitude\",\"type\":\"uint8\"}],\"internalType\":\"structIGatewayRegistry.Gateway\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"name\":\"gatewaysPaged\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"publicKey\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"antennaGain\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"frequencyPlan\",\"type\":\"uint8\"},{\"internalType\":\"int64\",\"name\":\"location\",\"type\":\"int64\"},{\"internalType\":\"uint8\",\"name\":\"altitude\",\"type\":\"uint8\"}],\"internalType\":\"structIGatewayRegistry.Gateway[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"gatewayId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"offboard\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"gatewayId\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"onboard\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registeredGateways\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"fp\",\"type\":\"uint8\"}],\"name\":\"removeFrequencyPlan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"onboards\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"offboards\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"updates\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"transfers\",\"type\":\"bool\"}],\"name\":\"setPauseStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"gatewayId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"currentOwner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"gatewayId\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"antennaGain\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"frequencyPlan\",\"type\":\"uint8\"},{\"internalType\":\"int64\",\"name\":\"location\",\"type\":\"int64\"},{\"internalType\":\"uint8\",\"name\":\"altitude\",\"type\":\"uint8\"}],\"name\":\"update\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// GatewayRegistryABI is the input ABI used to generate the binding from. +// Deprecated: Use GatewayRegistryMetaData.ABI instead. +var GatewayRegistryABI = GatewayRegistryMetaData.ABI + +// GatewayRegistry is an auto generated Go binding around an Ethereum contract. +type GatewayRegistry struct { + GatewayRegistryCaller // Read-only binding to the contract + GatewayRegistryTransactor // Write-only binding to the contract + GatewayRegistryFilterer // Log filterer for contract events +} + +// GatewayRegistryCaller is an auto generated read-only Go binding around an Ethereum contract. +type GatewayRegistryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayRegistryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type GatewayRegistryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayRegistryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type GatewayRegistryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// GatewayRegistrySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type GatewayRegistrySession struct { + Contract *GatewayRegistry // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GatewayRegistryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type GatewayRegistryCallerSession struct { + Contract *GatewayRegistryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// GatewayRegistryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type GatewayRegistryTransactorSession struct { + Contract *GatewayRegistryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// GatewayRegistryRaw is an auto generated low-level Go binding around an Ethereum contract. +type GatewayRegistryRaw struct { + Contract *GatewayRegistry // Generic contract binding to access the raw methods on +} + +// GatewayRegistryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type GatewayRegistryCallerRaw struct { + Contract *GatewayRegistryCaller // Generic read-only contract binding to access the raw methods on +} + +// GatewayRegistryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type GatewayRegistryTransactorRaw struct { + Contract *GatewayRegistryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewGatewayRegistry creates a new instance of GatewayRegistry, bound to a specific deployed contract. +func NewGatewayRegistry(address common.Address, backend bind.ContractBackend) (*GatewayRegistry, error) { + contract, err := bindGatewayRegistry(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &GatewayRegistry{GatewayRegistryCaller: GatewayRegistryCaller{contract: contract}, GatewayRegistryTransactor: GatewayRegistryTransactor{contract: contract}, GatewayRegistryFilterer: GatewayRegistryFilterer{contract: contract}}, nil +} + +// NewGatewayRegistryCaller creates a new read-only instance of GatewayRegistry, bound to a specific deployed contract. +func NewGatewayRegistryCaller(address common.Address, caller bind.ContractCaller) (*GatewayRegistryCaller, error) { + contract, err := bindGatewayRegistry(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &GatewayRegistryCaller{contract: contract}, nil +} + +// NewGatewayRegistryTransactor creates a new write-only instance of GatewayRegistry, bound to a specific deployed contract. +func NewGatewayRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*GatewayRegistryTransactor, error) { + contract, err := bindGatewayRegistry(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &GatewayRegistryTransactor{contract: contract}, nil +} + +// NewGatewayRegistryFilterer creates a new log filterer instance of GatewayRegistry, bound to a specific deployed contract. +func NewGatewayRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*GatewayRegistryFilterer, error) { + contract, err := bindGatewayRegistry(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &GatewayRegistryFilterer{contract: contract}, nil +} + +// bindGatewayRegistry binds a generic wrapper to an already deployed contract. +func bindGatewayRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(GatewayRegistryABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_GatewayRegistry *GatewayRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GatewayRegistry.Contract.GatewayRegistryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_GatewayRegistry *GatewayRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayRegistry.Contract.GatewayRegistryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GatewayRegistry *GatewayRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GatewayRegistry.Contract.GatewayRegistryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_GatewayRegistry *GatewayRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _GatewayRegistry.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_GatewayRegistry *GatewayRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _GatewayRegistry.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_GatewayRegistry *GatewayRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _GatewayRegistry.Contract.contract.Transact(opts, method, params...) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCaller) DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "DEFAULT_ADMIN_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistrySession) DEFAULTADMINROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.DEFAULTADMINROLE(&_GatewayRegistry.CallOpts) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCallerSession) DEFAULTADMINROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.DEFAULTADMINROLE(&_GatewayRegistry.CallOpts) +} + +// GATEWAYOFFBOARDROLE is a free data retrieval call binding the contract method 0xd9044941. +// +// Solidity: function GATEWAY_OFFBOARD_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCaller) GATEWAYOFFBOARDROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "GATEWAY_OFFBOARD_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GATEWAYOFFBOARDROLE is a free data retrieval call binding the contract method 0xd9044941. +// +// Solidity: function GATEWAY_OFFBOARD_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistrySession) GATEWAYOFFBOARDROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.GATEWAYOFFBOARDROLE(&_GatewayRegistry.CallOpts) +} + +// GATEWAYOFFBOARDROLE is a free data retrieval call binding the contract method 0xd9044941. +// +// Solidity: function GATEWAY_OFFBOARD_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCallerSession) GATEWAYOFFBOARDROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.GATEWAYOFFBOARDROLE(&_GatewayRegistry.CallOpts) +} + +// GATEWAYONBOARDERROLE is a free data retrieval call binding the contract method 0x473682c3. +// +// Solidity: function GATEWAY_ONBOARDER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCaller) GATEWAYONBOARDERROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "GATEWAY_ONBOARDER_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GATEWAYONBOARDERROLE is a free data retrieval call binding the contract method 0x473682c3. +// +// Solidity: function GATEWAY_ONBOARDER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistrySession) GATEWAYONBOARDERROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.GATEWAYONBOARDERROLE(&_GatewayRegistry.CallOpts) +} + +// GATEWAYONBOARDERROLE is a free data retrieval call binding the contract method 0x473682c3. +// +// Solidity: function GATEWAY_ONBOARDER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCallerSession) GATEWAYONBOARDERROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.GATEWAYONBOARDERROLE(&_GatewayRegistry.CallOpts) +} + +// GATEWAYTRANSFERROLE is a free data retrieval call binding the contract method 0x569b9c5f. +// +// Solidity: function GATEWAY_TRANSFER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCaller) GATEWAYTRANSFERROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "GATEWAY_TRANSFER_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GATEWAYTRANSFERROLE is a free data retrieval call binding the contract method 0x569b9c5f. +// +// Solidity: function GATEWAY_TRANSFER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistrySession) GATEWAYTRANSFERROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.GATEWAYTRANSFERROLE(&_GatewayRegistry.CallOpts) +} + +// GATEWAYTRANSFERROLE is a free data retrieval call binding the contract method 0x569b9c5f. +// +// Solidity: function GATEWAY_TRANSFER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCallerSession) GATEWAYTRANSFERROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.GATEWAYTRANSFERROLE(&_GatewayRegistry.CallOpts) +} + +// GATEWAYUPDATERROLE is a free data retrieval call binding the contract method 0xff1d8d5f. +// +// Solidity: function GATEWAY_UPDATER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCaller) GATEWAYUPDATERROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "GATEWAY_UPDATER_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GATEWAYUPDATERROLE is a free data retrieval call binding the contract method 0xff1d8d5f. +// +// Solidity: function GATEWAY_UPDATER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistrySession) GATEWAYUPDATERROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.GATEWAYUPDATERROLE(&_GatewayRegistry.CallOpts) +} + +// GATEWAYUPDATERROLE is a free data retrieval call binding the contract method 0xff1d8d5f. +// +// Solidity: function GATEWAY_UPDATER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCallerSession) GATEWAYUPDATERROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.GATEWAYUPDATERROLE(&_GatewayRegistry.CallOpts) +} + +// TRUSTEDFORWARDERROLE is a free data retrieval call binding the contract method 0x00cba943. +// +// Solidity: function TRUSTED_FORWARDER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCaller) TRUSTEDFORWARDERROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "TRUSTED_FORWARDER_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// TRUSTEDFORWARDERROLE is a free data retrieval call binding the contract method 0x00cba943. +// +// Solidity: function TRUSTED_FORWARDER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistrySession) TRUSTEDFORWARDERROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.TRUSTEDFORWARDERROLE(&_GatewayRegistry.CallOpts) +} + +// TRUSTEDFORWARDERROLE is a free data retrieval call binding the contract method 0x00cba943. +// +// Solidity: function TRUSTED_FORWARDER_ROLE() view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCallerSession) TRUSTEDFORWARDERROLE() ([32]byte, error) { + return _GatewayRegistry.Contract.TRUSTEDFORWARDERROLE(&_GatewayRegistry.CallOpts) +} + +// FrequencyPlans is a free data retrieval call binding the contract method 0x809ae202. +// +// Solidity: function frequencyPlans(uint8 ) view returns(string) +func (_GatewayRegistry *GatewayRegistryCaller) FrequencyPlans(opts *bind.CallOpts, arg0 uint8) (string, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "frequencyPlans", arg0) + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// FrequencyPlans is a free data retrieval call binding the contract method 0x809ae202. +// +// Solidity: function frequencyPlans(uint8 ) view returns(string) +func (_GatewayRegistry *GatewayRegistrySession) FrequencyPlans(arg0 uint8) (string, error) { + return _GatewayRegistry.Contract.FrequencyPlans(&_GatewayRegistry.CallOpts, arg0) +} + +// FrequencyPlans is a free data retrieval call binding the contract method 0x809ae202. +// +// Solidity: function frequencyPlans(uint8 ) view returns(string) +func (_GatewayRegistry *GatewayRegistryCallerSession) FrequencyPlans(arg0 uint8) (string, error) { + return _GatewayRegistry.Contract.FrequencyPlans(&_GatewayRegistry.CallOpts, arg0) +} + +// GatewayCount is a free data retrieval call binding the contract method 0xbe1e5aa5. +// +// Solidity: function gatewayCount(address owner) view returns(uint256) +func (_GatewayRegistry *GatewayRegistryCaller) GatewayCount(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "gatewayCount", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GatewayCount is a free data retrieval call binding the contract method 0xbe1e5aa5. +// +// Solidity: function gatewayCount(address owner) view returns(uint256) +func (_GatewayRegistry *GatewayRegistrySession) GatewayCount(owner common.Address) (*big.Int, error) { + return _GatewayRegistry.Contract.GatewayCount(&_GatewayRegistry.CallOpts, owner) +} + +// GatewayCount is a free data retrieval call binding the contract method 0xbe1e5aa5. +// +// Solidity: function gatewayCount(address owner) view returns(uint256) +func (_GatewayRegistry *GatewayRegistryCallerSession) GatewayCount(owner common.Address) (*big.Int, error) { + return _GatewayRegistry.Contract.GatewayCount(&_GatewayRegistry.CallOpts, owner) +} + +// GatewayOwner is a free data retrieval call binding the contract method 0x78c8ae5f. +// +// Solidity: function gatewayOwner(bytes32 id) view returns(address) +func (_GatewayRegistry *GatewayRegistryCaller) GatewayOwner(opts *bind.CallOpts, id [32]byte) (common.Address, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "gatewayOwner", id) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GatewayOwner is a free data retrieval call binding the contract method 0x78c8ae5f. +// +// Solidity: function gatewayOwner(bytes32 id) view returns(address) +func (_GatewayRegistry *GatewayRegistrySession) GatewayOwner(id [32]byte) (common.Address, error) { + return _GatewayRegistry.Contract.GatewayOwner(&_GatewayRegistry.CallOpts, id) +} + +// GatewayOwner is a free data retrieval call binding the contract method 0x78c8ae5f. +// +// Solidity: function gatewayOwner(bytes32 id) view returns(address) +func (_GatewayRegistry *GatewayRegistryCallerSession) GatewayOwner(id [32]byte) (common.Address, error) { + return _GatewayRegistry.Contract.GatewayOwner(&_GatewayRegistry.CallOpts, id) +} + +// Gateways is a free data retrieval call binding the contract method 0xfbe336ff. +// +// Solidity: function gateways(bytes32 id) view returns((bytes32,uint8,address,uint8,uint8,int64,uint8)) +func (_GatewayRegistry *GatewayRegistryCaller) Gateways(opts *bind.CallOpts, id [32]byte) (IGatewayRegistryGateway, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "gateways", id) + + if err != nil { + return *new(IGatewayRegistryGateway), err + } + + out0 := *abi.ConvertType(out[0], new(IGatewayRegistryGateway)).(*IGatewayRegistryGateway) + + return out0, err + +} + +// Gateways is a free data retrieval call binding the contract method 0xfbe336ff. +// +// Solidity: function gateways(bytes32 id) view returns((bytes32,uint8,address,uint8,uint8,int64,uint8)) +func (_GatewayRegistry *GatewayRegistrySession) Gateways(id [32]byte) (IGatewayRegistryGateway, error) { + return _GatewayRegistry.Contract.Gateways(&_GatewayRegistry.CallOpts, id) +} + +// Gateways is a free data retrieval call binding the contract method 0xfbe336ff. +// +// Solidity: function gateways(bytes32 id) view returns((bytes32,uint8,address,uint8,uint8,int64,uint8)) +func (_GatewayRegistry *GatewayRegistryCallerSession) Gateways(id [32]byte) (IGatewayRegistryGateway, error) { + return _GatewayRegistry.Contract.Gateways(&_GatewayRegistry.CallOpts, id) +} + +// GatewaysPaged is a free data retrieval call binding the contract method 0xd3fa7495. +// +// Solidity: function gatewaysPaged(address owner, uint256 start, uint256 end) view returns((bytes32,uint8,address,uint8,uint8,int64,uint8)[]) +func (_GatewayRegistry *GatewayRegistryCaller) GatewaysPaged(opts *bind.CallOpts, owner common.Address, start *big.Int, end *big.Int) ([]IGatewayRegistryGateway, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "gatewaysPaged", owner, start, end) + + if err != nil { + return *new([]IGatewayRegistryGateway), err + } + + out0 := *abi.ConvertType(out[0], new([]IGatewayRegistryGateway)).(*[]IGatewayRegistryGateway) + + return out0, err + +} + +// GatewaysPaged is a free data retrieval call binding the contract method 0xd3fa7495. +// +// Solidity: function gatewaysPaged(address owner, uint256 start, uint256 end) view returns((bytes32,uint8,address,uint8,uint8,int64,uint8)[]) +func (_GatewayRegistry *GatewayRegistrySession) GatewaysPaged(owner common.Address, start *big.Int, end *big.Int) ([]IGatewayRegistryGateway, error) { + return _GatewayRegistry.Contract.GatewaysPaged(&_GatewayRegistry.CallOpts, owner, start, end) +} + +// GatewaysPaged is a free data retrieval call binding the contract method 0xd3fa7495. +// +// Solidity: function gatewaysPaged(address owner, uint256 start, uint256 end) view returns((bytes32,uint8,address,uint8,uint8,int64,uint8)[]) +func (_GatewayRegistry *GatewayRegistryCallerSession) GatewaysPaged(owner common.Address, start *big.Int, end *big.Int) ([]IGatewayRegistryGateway, error) { + return _GatewayRegistry.Contract.GatewaysPaged(&_GatewayRegistry.CallOpts, owner, start, end) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCaller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "getRoleAdmin", role) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_GatewayRegistry *GatewayRegistrySession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _GatewayRegistry.Contract.GetRoleAdmin(&_GatewayRegistry.CallOpts, role) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_GatewayRegistry *GatewayRegistryCallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _GatewayRegistry.Contract.GetRoleAdmin(&_GatewayRegistry.CallOpts, role) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_GatewayRegistry *GatewayRegistryCaller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "hasRole", role, account) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_GatewayRegistry *GatewayRegistrySession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _GatewayRegistry.Contract.HasRole(&_GatewayRegistry.CallOpts, role, account) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_GatewayRegistry *GatewayRegistryCallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _GatewayRegistry.Contract.HasRole(&_GatewayRegistry.CallOpts, role, account) +} + +// RegisteredGateways is a free data retrieval call binding the contract method 0x06543c1a. +// +// Solidity: function registeredGateways() view returns(uint256) +func (_GatewayRegistry *GatewayRegistryCaller) RegisteredGateways(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "registeredGateways") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// RegisteredGateways is a free data retrieval call binding the contract method 0x06543c1a. +// +// Solidity: function registeredGateways() view returns(uint256) +func (_GatewayRegistry *GatewayRegistrySession) RegisteredGateways() (*big.Int, error) { + return _GatewayRegistry.Contract.RegisteredGateways(&_GatewayRegistry.CallOpts) +} + +// RegisteredGateways is a free data retrieval call binding the contract method 0x06543c1a. +// +// Solidity: function registeredGateways() view returns(uint256) +func (_GatewayRegistry *GatewayRegistryCallerSession) RegisteredGateways() (*big.Int, error) { + return _GatewayRegistry.Contract.RegisteredGateways(&_GatewayRegistry.CallOpts) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_GatewayRegistry *GatewayRegistryCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _GatewayRegistry.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_GatewayRegistry *GatewayRegistrySession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _GatewayRegistry.Contract.SupportsInterface(&_GatewayRegistry.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_GatewayRegistry *GatewayRegistryCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _GatewayRegistry.Contract.SupportsInterface(&_GatewayRegistry.CallOpts, interfaceId) +} + +// AddFrequencyPlan is a paid mutator transaction binding the contract method 0x640335c7. +// +// Solidity: function addFrequencyPlan(uint8 fp, string name) returns() +func (_GatewayRegistry *GatewayRegistryTransactor) AddFrequencyPlan(opts *bind.TransactOpts, fp uint8, name string) (*types.Transaction, error) { + return _GatewayRegistry.contract.Transact(opts, "addFrequencyPlan", fp, name) +} + +// AddFrequencyPlan is a paid mutator transaction binding the contract method 0x640335c7. +// +// Solidity: function addFrequencyPlan(uint8 fp, string name) returns() +func (_GatewayRegistry *GatewayRegistrySession) AddFrequencyPlan(fp uint8, name string) (*types.Transaction, error) { + return _GatewayRegistry.Contract.AddFrequencyPlan(&_GatewayRegistry.TransactOpts, fp, name) +} + +// AddFrequencyPlan is a paid mutator transaction binding the contract method 0x640335c7. +// +// Solidity: function addFrequencyPlan(uint8 fp, string name) returns() +func (_GatewayRegistry *GatewayRegistryTransactorSession) AddFrequencyPlan(fp uint8, name string) (*types.Transaction, error) { + return _GatewayRegistry.Contract.AddFrequencyPlan(&_GatewayRegistry.TransactOpts, fp, name) +} + +// Destroy is a paid mutator transaction binding the contract method 0x00f55d9d. +// +// Solidity: function destroy(address beneficiary) returns() +func (_GatewayRegistry *GatewayRegistryTransactor) Destroy(opts *bind.TransactOpts, beneficiary common.Address) (*types.Transaction, error) { + return _GatewayRegistry.contract.Transact(opts, "destroy", beneficiary) +} + +// Destroy is a paid mutator transaction binding the contract method 0x00f55d9d. +// +// Solidity: function destroy(address beneficiary) returns() +func (_GatewayRegistry *GatewayRegistrySession) Destroy(beneficiary common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.Destroy(&_GatewayRegistry.TransactOpts, beneficiary) +} + +// Destroy is a paid mutator transaction binding the contract method 0x00f55d9d. +// +// Solidity: function destroy(address beneficiary) returns() +func (_GatewayRegistry *GatewayRegistryTransactorSession) Destroy(beneficiary common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.Destroy(&_GatewayRegistry.TransactOpts, beneficiary) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_GatewayRegistry *GatewayRegistryTransactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _GatewayRegistry.contract.Transact(opts, "grantRole", role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_GatewayRegistry *GatewayRegistrySession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.GrantRole(&_GatewayRegistry.TransactOpts, role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_GatewayRegistry *GatewayRegistryTransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.GrantRole(&_GatewayRegistry.TransactOpts, role, account) +} + +// Offboard is a paid mutator transaction binding the contract method 0x55bb316c. +// +// Solidity: function offboard(bytes32 gatewayId, address owner) returns() +func (_GatewayRegistry *GatewayRegistryTransactor) Offboard(opts *bind.TransactOpts, gatewayId [32]byte, owner common.Address) (*types.Transaction, error) { + return _GatewayRegistry.contract.Transact(opts, "offboard", gatewayId, owner) +} + +// Offboard is a paid mutator transaction binding the contract method 0x55bb316c. +// +// Solidity: function offboard(bytes32 gatewayId, address owner) returns() +func (_GatewayRegistry *GatewayRegistrySession) Offboard(gatewayId [32]byte, owner common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.Offboard(&_GatewayRegistry.TransactOpts, gatewayId, owner) +} + +// Offboard is a paid mutator transaction binding the contract method 0x55bb316c. +// +// Solidity: function offboard(bytes32 gatewayId, address owner) returns() +func (_GatewayRegistry *GatewayRegistryTransactorSession) Offboard(gatewayId [32]byte, owner common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.Offboard(&_GatewayRegistry.TransactOpts, gatewayId, owner) +} + +// Onboard is a paid mutator transaction binding the contract method 0x5a5bc82b. +// +// Solidity: function onboard(bytes32 gatewayId, uint8 version, address owner) returns() +func (_GatewayRegistry *GatewayRegistryTransactor) Onboard(opts *bind.TransactOpts, gatewayId [32]byte, version uint8, owner common.Address) (*types.Transaction, error) { + return _GatewayRegistry.contract.Transact(opts, "onboard", gatewayId, version, owner) +} + +// Onboard is a paid mutator transaction binding the contract method 0x5a5bc82b. +// +// Solidity: function onboard(bytes32 gatewayId, uint8 version, address owner) returns() +func (_GatewayRegistry *GatewayRegistrySession) Onboard(gatewayId [32]byte, version uint8, owner common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.Onboard(&_GatewayRegistry.TransactOpts, gatewayId, version, owner) +} + +// Onboard is a paid mutator transaction binding the contract method 0x5a5bc82b. +// +// Solidity: function onboard(bytes32 gatewayId, uint8 version, address owner) returns() +func (_GatewayRegistry *GatewayRegistryTransactorSession) Onboard(gatewayId [32]byte, version uint8, owner common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.Onboard(&_GatewayRegistry.TransactOpts, gatewayId, version, owner) +} + +// RemoveFrequencyPlan is a paid mutator transaction binding the contract method 0x893729b3. +// +// Solidity: function removeFrequencyPlan(uint8 fp) returns() +func (_GatewayRegistry *GatewayRegistryTransactor) RemoveFrequencyPlan(opts *bind.TransactOpts, fp uint8) (*types.Transaction, error) { + return _GatewayRegistry.contract.Transact(opts, "removeFrequencyPlan", fp) +} + +// RemoveFrequencyPlan is a paid mutator transaction binding the contract method 0x893729b3. +// +// Solidity: function removeFrequencyPlan(uint8 fp) returns() +func (_GatewayRegistry *GatewayRegistrySession) RemoveFrequencyPlan(fp uint8) (*types.Transaction, error) { + return _GatewayRegistry.Contract.RemoveFrequencyPlan(&_GatewayRegistry.TransactOpts, fp) +} + +// RemoveFrequencyPlan is a paid mutator transaction binding the contract method 0x893729b3. +// +// Solidity: function removeFrequencyPlan(uint8 fp) returns() +func (_GatewayRegistry *GatewayRegistryTransactorSession) RemoveFrequencyPlan(fp uint8) (*types.Transaction, error) { + return _GatewayRegistry.Contract.RemoveFrequencyPlan(&_GatewayRegistry.TransactOpts, fp) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_GatewayRegistry *GatewayRegistryTransactor) RenounceRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _GatewayRegistry.contract.Transact(opts, "renounceRole", role, account) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_GatewayRegistry *GatewayRegistrySession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.RenounceRole(&_GatewayRegistry.TransactOpts, role, account) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_GatewayRegistry *GatewayRegistryTransactorSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.RenounceRole(&_GatewayRegistry.TransactOpts, role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_GatewayRegistry *GatewayRegistryTransactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _GatewayRegistry.contract.Transact(opts, "revokeRole", role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_GatewayRegistry *GatewayRegistrySession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.RevokeRole(&_GatewayRegistry.TransactOpts, role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_GatewayRegistry *GatewayRegistryTransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.RevokeRole(&_GatewayRegistry.TransactOpts, role, account) +} + +// SetPauseStatus is a paid mutator transaction binding the contract method 0x1c6fd6ab. +// +// Solidity: function setPauseStatus(bool onboards, bool offboards, bool updates, bool transfers) returns() +func (_GatewayRegistry *GatewayRegistryTransactor) SetPauseStatus(opts *bind.TransactOpts, onboards bool, offboards bool, updates bool, transfers bool) (*types.Transaction, error) { + return _GatewayRegistry.contract.Transact(opts, "setPauseStatus", onboards, offboards, updates, transfers) +} + +// SetPauseStatus is a paid mutator transaction binding the contract method 0x1c6fd6ab. +// +// Solidity: function setPauseStatus(bool onboards, bool offboards, bool updates, bool transfers) returns() +func (_GatewayRegistry *GatewayRegistrySession) SetPauseStatus(onboards bool, offboards bool, updates bool, transfers bool) (*types.Transaction, error) { + return _GatewayRegistry.Contract.SetPauseStatus(&_GatewayRegistry.TransactOpts, onboards, offboards, updates, transfers) +} + +// SetPauseStatus is a paid mutator transaction binding the contract method 0x1c6fd6ab. +// +// Solidity: function setPauseStatus(bool onboards, bool offboards, bool updates, bool transfers) returns() +func (_GatewayRegistry *GatewayRegistryTransactorSession) SetPauseStatus(onboards bool, offboards bool, updates bool, transfers bool) (*types.Transaction, error) { + return _GatewayRegistry.Contract.SetPauseStatus(&_GatewayRegistry.TransactOpts, onboards, offboards, updates, transfers) +} + +// Transfer is a paid mutator transaction binding the contract method 0x3d6028ca. +// +// Solidity: function transfer(bytes32 gatewayId, address currentOwner, address newOwner) returns() +func (_GatewayRegistry *GatewayRegistryTransactor) Transfer(opts *bind.TransactOpts, gatewayId [32]byte, currentOwner common.Address, newOwner common.Address) (*types.Transaction, error) { + return _GatewayRegistry.contract.Transact(opts, "transfer", gatewayId, currentOwner, newOwner) +} + +// Transfer is a paid mutator transaction binding the contract method 0x3d6028ca. +// +// Solidity: function transfer(bytes32 gatewayId, address currentOwner, address newOwner) returns() +func (_GatewayRegistry *GatewayRegistrySession) Transfer(gatewayId [32]byte, currentOwner common.Address, newOwner common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.Transfer(&_GatewayRegistry.TransactOpts, gatewayId, currentOwner, newOwner) +} + +// Transfer is a paid mutator transaction binding the contract method 0x3d6028ca. +// +// Solidity: function transfer(bytes32 gatewayId, address currentOwner, address newOwner) returns() +func (_GatewayRegistry *GatewayRegistryTransactorSession) Transfer(gatewayId [32]byte, currentOwner common.Address, newOwner common.Address) (*types.Transaction, error) { + return _GatewayRegistry.Contract.Transfer(&_GatewayRegistry.TransactOpts, gatewayId, currentOwner, newOwner) +} + +// Update is a paid mutator transaction binding the contract method 0x5f7bca1c. +// +// Solidity: function update(bytes32 gatewayId, uint8 version, address owner, uint8 antennaGain, uint8 frequencyPlan, int64 location, uint8 altitude) returns() +func (_GatewayRegistry *GatewayRegistryTransactor) Update(opts *bind.TransactOpts, gatewayId [32]byte, version uint8, owner common.Address, antennaGain uint8, frequencyPlan uint8, location int64, altitude uint8) (*types.Transaction, error) { + return _GatewayRegistry.contract.Transact(opts, "update", gatewayId, version, owner, antennaGain, frequencyPlan, location, altitude) +} + +// Update is a paid mutator transaction binding the contract method 0x5f7bca1c. +// +// Solidity: function update(bytes32 gatewayId, uint8 version, address owner, uint8 antennaGain, uint8 frequencyPlan, int64 location, uint8 altitude) returns() +func (_GatewayRegistry *GatewayRegistrySession) Update(gatewayId [32]byte, version uint8, owner common.Address, antennaGain uint8, frequencyPlan uint8, location int64, altitude uint8) (*types.Transaction, error) { + return _GatewayRegistry.Contract.Update(&_GatewayRegistry.TransactOpts, gatewayId, version, owner, antennaGain, frequencyPlan, location, altitude) +} + +// Update is a paid mutator transaction binding the contract method 0x5f7bca1c. +// +// Solidity: function update(bytes32 gatewayId, uint8 version, address owner, uint8 antennaGain, uint8 frequencyPlan, int64 location, uint8 altitude) returns() +func (_GatewayRegistry *GatewayRegistryTransactorSession) Update(gatewayId [32]byte, version uint8, owner common.Address, antennaGain uint8, frequencyPlan uint8, location int64, altitude uint8) (*types.Transaction, error) { + return _GatewayRegistry.Contract.Update(&_GatewayRegistry.TransactOpts, gatewayId, version, owner, antennaGain, frequencyPlan, location, altitude) +} + +// GatewayRegistryFrequencyPlanAddedIterator is returned from FilterFrequencyPlanAdded and is used to iterate over the raw logs and unpacked data for FrequencyPlanAdded events raised by the GatewayRegistry contract. +type GatewayRegistryFrequencyPlanAddedIterator struct { + Event *GatewayRegistryFrequencyPlanAdded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GatewayRegistryFrequencyPlanAddedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryFrequencyPlanAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryFrequencyPlanAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayRegistryFrequencyPlanAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayRegistryFrequencyPlanAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayRegistryFrequencyPlanAdded represents a FrequencyPlanAdded event raised by the GatewayRegistry contract. +type GatewayRegistryFrequencyPlanAdded struct { + Arg0 uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFrequencyPlanAdded is a free log retrieval operation binding the contract event 0x5eb1afacf56fce1c91289feeed93783eefc45e3111990d01a42bde4078ec6198. +// +// Solidity: event FrequencyPlanAdded(uint8 indexed arg0) +func (_GatewayRegistry *GatewayRegistryFilterer) FilterFrequencyPlanAdded(opts *bind.FilterOpts, arg0 []uint8) (*GatewayRegistryFrequencyPlanAddedIterator, error) { + + var arg0Rule []interface{} + for _, arg0Item := range arg0 { + arg0Rule = append(arg0Rule, arg0Item) + } + + logs, sub, err := _GatewayRegistry.contract.FilterLogs(opts, "FrequencyPlanAdded", arg0Rule) + if err != nil { + return nil, err + } + return &GatewayRegistryFrequencyPlanAddedIterator{contract: _GatewayRegistry.contract, event: "FrequencyPlanAdded", logs: logs, sub: sub}, nil +} + +// WatchFrequencyPlanAdded is a free log subscription operation binding the contract event 0x5eb1afacf56fce1c91289feeed93783eefc45e3111990d01a42bde4078ec6198. +// +// Solidity: event FrequencyPlanAdded(uint8 indexed arg0) +func (_GatewayRegistry *GatewayRegistryFilterer) WatchFrequencyPlanAdded(opts *bind.WatchOpts, sink chan<- *GatewayRegistryFrequencyPlanAdded, arg0 []uint8) (event.Subscription, error) { + + var arg0Rule []interface{} + for _, arg0Item := range arg0 { + arg0Rule = append(arg0Rule, arg0Item) + } + + logs, sub, err := _GatewayRegistry.contract.WatchLogs(opts, "FrequencyPlanAdded", arg0Rule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayRegistryFrequencyPlanAdded) + if err := _GatewayRegistry.contract.UnpackLog(event, "FrequencyPlanAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseFrequencyPlanAdded is a log parse operation binding the contract event 0x5eb1afacf56fce1c91289feeed93783eefc45e3111990d01a42bde4078ec6198. +// +// Solidity: event FrequencyPlanAdded(uint8 indexed arg0) +func (_GatewayRegistry *GatewayRegistryFilterer) ParseFrequencyPlanAdded(log types.Log) (*GatewayRegistryFrequencyPlanAdded, error) { + event := new(GatewayRegistryFrequencyPlanAdded) + if err := _GatewayRegistry.contract.UnpackLog(event, "FrequencyPlanAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayRegistryFrequencyPlanRemovedIterator is returned from FilterFrequencyPlanRemoved and is used to iterate over the raw logs and unpacked data for FrequencyPlanRemoved events raised by the GatewayRegistry contract. +type GatewayRegistryFrequencyPlanRemovedIterator struct { + Event *GatewayRegistryFrequencyPlanRemoved // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GatewayRegistryFrequencyPlanRemovedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryFrequencyPlanRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryFrequencyPlanRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayRegistryFrequencyPlanRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayRegistryFrequencyPlanRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayRegistryFrequencyPlanRemoved represents a FrequencyPlanRemoved event raised by the GatewayRegistry contract. +type GatewayRegistryFrequencyPlanRemoved struct { + Arg0 uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFrequencyPlanRemoved is a free log retrieval operation binding the contract event 0x898a81f51a8979704f8c50be34010e7d8aac481090dbff9badfd49079b58f06f. +// +// Solidity: event FrequencyPlanRemoved(uint8 indexed arg0) +func (_GatewayRegistry *GatewayRegistryFilterer) FilterFrequencyPlanRemoved(opts *bind.FilterOpts, arg0 []uint8) (*GatewayRegistryFrequencyPlanRemovedIterator, error) { + + var arg0Rule []interface{} + for _, arg0Item := range arg0 { + arg0Rule = append(arg0Rule, arg0Item) + } + + logs, sub, err := _GatewayRegistry.contract.FilterLogs(opts, "FrequencyPlanRemoved", arg0Rule) + if err != nil { + return nil, err + } + return &GatewayRegistryFrequencyPlanRemovedIterator{contract: _GatewayRegistry.contract, event: "FrequencyPlanRemoved", logs: logs, sub: sub}, nil +} + +// WatchFrequencyPlanRemoved is a free log subscription operation binding the contract event 0x898a81f51a8979704f8c50be34010e7d8aac481090dbff9badfd49079b58f06f. +// +// Solidity: event FrequencyPlanRemoved(uint8 indexed arg0) +func (_GatewayRegistry *GatewayRegistryFilterer) WatchFrequencyPlanRemoved(opts *bind.WatchOpts, sink chan<- *GatewayRegistryFrequencyPlanRemoved, arg0 []uint8) (event.Subscription, error) { + + var arg0Rule []interface{} + for _, arg0Item := range arg0 { + arg0Rule = append(arg0Rule, arg0Item) + } + + logs, sub, err := _GatewayRegistry.contract.WatchLogs(opts, "FrequencyPlanRemoved", arg0Rule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayRegistryFrequencyPlanRemoved) + if err := _GatewayRegistry.contract.UnpackLog(event, "FrequencyPlanRemoved", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseFrequencyPlanRemoved is a log parse operation binding the contract event 0x898a81f51a8979704f8c50be34010e7d8aac481090dbff9badfd49079b58f06f. +// +// Solidity: event FrequencyPlanRemoved(uint8 indexed arg0) +func (_GatewayRegistry *GatewayRegistryFilterer) ParseFrequencyPlanRemoved(log types.Log) (*GatewayRegistryFrequencyPlanRemoved, error) { + event := new(GatewayRegistryFrequencyPlanRemoved) + if err := _GatewayRegistry.contract.UnpackLog(event, "FrequencyPlanRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayRegistryGatewayOffboardedIterator is returned from FilterGatewayOffboarded and is used to iterate over the raw logs and unpacked data for GatewayOffboarded events raised by the GatewayRegistry contract. +type GatewayRegistryGatewayOffboardedIterator struct { + Event *GatewayRegistryGatewayOffboarded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GatewayRegistryGatewayOffboardedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryGatewayOffboarded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryGatewayOffboarded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayRegistryGatewayOffboardedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayRegistryGatewayOffboardedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayRegistryGatewayOffboarded represents a GatewayOffboarded event raised by the GatewayRegistry contract. +type GatewayRegistryGatewayOffboarded struct { + GatewayId [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterGatewayOffboarded is a free log retrieval operation binding the contract event 0x3fdaf0b55cfef0439169d60405b136ee3fd10646dd858e08a8334f9000c3eba7. +// +// Solidity: event GatewayOffboarded(bytes32 indexed gatewayId) +func (_GatewayRegistry *GatewayRegistryFilterer) FilterGatewayOffboarded(opts *bind.FilterOpts, gatewayId [][32]byte) (*GatewayRegistryGatewayOffboardedIterator, error) { + + var gatewayIdRule []interface{} + for _, gatewayIdItem := range gatewayId { + gatewayIdRule = append(gatewayIdRule, gatewayIdItem) + } + + logs, sub, err := _GatewayRegistry.contract.FilterLogs(opts, "GatewayOffboarded", gatewayIdRule) + if err != nil { + return nil, err + } + return &GatewayRegistryGatewayOffboardedIterator{contract: _GatewayRegistry.contract, event: "GatewayOffboarded", logs: logs, sub: sub}, nil +} + +// WatchGatewayOffboarded is a free log subscription operation binding the contract event 0x3fdaf0b55cfef0439169d60405b136ee3fd10646dd858e08a8334f9000c3eba7. +// +// Solidity: event GatewayOffboarded(bytes32 indexed gatewayId) +func (_GatewayRegistry *GatewayRegistryFilterer) WatchGatewayOffboarded(opts *bind.WatchOpts, sink chan<- *GatewayRegistryGatewayOffboarded, gatewayId [][32]byte) (event.Subscription, error) { + + var gatewayIdRule []interface{} + for _, gatewayIdItem := range gatewayId { + gatewayIdRule = append(gatewayIdRule, gatewayIdItem) + } + + logs, sub, err := _GatewayRegistry.contract.WatchLogs(opts, "GatewayOffboarded", gatewayIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayRegistryGatewayOffboarded) + if err := _GatewayRegistry.contract.UnpackLog(event, "GatewayOffboarded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseGatewayOffboarded is a log parse operation binding the contract event 0x3fdaf0b55cfef0439169d60405b136ee3fd10646dd858e08a8334f9000c3eba7. +// +// Solidity: event GatewayOffboarded(bytes32 indexed gatewayId) +func (_GatewayRegistry *GatewayRegistryFilterer) ParseGatewayOffboarded(log types.Log) (*GatewayRegistryGatewayOffboarded, error) { + event := new(GatewayRegistryGatewayOffboarded) + if err := _GatewayRegistry.contract.UnpackLog(event, "GatewayOffboarded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayRegistryGatewayOnboardedIterator is returned from FilterGatewayOnboarded and is used to iterate over the raw logs and unpacked data for GatewayOnboarded events raised by the GatewayRegistry contract. +type GatewayRegistryGatewayOnboardedIterator struct { + Event *GatewayRegistryGatewayOnboarded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GatewayRegistryGatewayOnboardedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryGatewayOnboarded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryGatewayOnboarded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayRegistryGatewayOnboardedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayRegistryGatewayOnboardedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayRegistryGatewayOnboarded represents a GatewayOnboarded event raised by the GatewayRegistry contract. +type GatewayRegistryGatewayOnboarded struct { + GatewayId [32]byte + Owner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterGatewayOnboarded is a free log retrieval operation binding the contract event 0xa60d6768fbd8c6717e7c8635f5bdf299dca6ff32aac817950e620eec5da47fdb. +// +// Solidity: event GatewayOnboarded(bytes32 indexed gatewayId, address indexed owner) +func (_GatewayRegistry *GatewayRegistryFilterer) FilterGatewayOnboarded(opts *bind.FilterOpts, gatewayId [][32]byte, owner []common.Address) (*GatewayRegistryGatewayOnboardedIterator, error) { + + var gatewayIdRule []interface{} + for _, gatewayIdItem := range gatewayId { + gatewayIdRule = append(gatewayIdRule, gatewayIdItem) + } + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + logs, sub, err := _GatewayRegistry.contract.FilterLogs(opts, "GatewayOnboarded", gatewayIdRule, ownerRule) + if err != nil { + return nil, err + } + return &GatewayRegistryGatewayOnboardedIterator{contract: _GatewayRegistry.contract, event: "GatewayOnboarded", logs: logs, sub: sub}, nil +} + +// WatchGatewayOnboarded is a free log subscription operation binding the contract event 0xa60d6768fbd8c6717e7c8635f5bdf299dca6ff32aac817950e620eec5da47fdb. +// +// Solidity: event GatewayOnboarded(bytes32 indexed gatewayId, address indexed owner) +func (_GatewayRegistry *GatewayRegistryFilterer) WatchGatewayOnboarded(opts *bind.WatchOpts, sink chan<- *GatewayRegistryGatewayOnboarded, gatewayId [][32]byte, owner []common.Address) (event.Subscription, error) { + + var gatewayIdRule []interface{} + for _, gatewayIdItem := range gatewayId { + gatewayIdRule = append(gatewayIdRule, gatewayIdItem) + } + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + logs, sub, err := _GatewayRegistry.contract.WatchLogs(opts, "GatewayOnboarded", gatewayIdRule, ownerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayRegistryGatewayOnboarded) + if err := _GatewayRegistry.contract.UnpackLog(event, "GatewayOnboarded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseGatewayOnboarded is a log parse operation binding the contract event 0xa60d6768fbd8c6717e7c8635f5bdf299dca6ff32aac817950e620eec5da47fdb. +// +// Solidity: event GatewayOnboarded(bytes32 indexed gatewayId, address indexed owner) +func (_GatewayRegistry *GatewayRegistryFilterer) ParseGatewayOnboarded(log types.Log) (*GatewayRegistryGatewayOnboarded, error) { + event := new(GatewayRegistryGatewayOnboarded) + if err := _GatewayRegistry.contract.UnpackLog(event, "GatewayOnboarded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayRegistryGatewayRegistryPausedIterator is returned from FilterGatewayRegistryPaused and is used to iterate over the raw logs and unpacked data for GatewayRegistryPaused events raised by the GatewayRegistry contract. +type GatewayRegistryGatewayRegistryPausedIterator struct { + Event *GatewayRegistryGatewayRegistryPaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GatewayRegistryGatewayRegistryPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryGatewayRegistryPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryGatewayRegistryPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayRegistryGatewayRegistryPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayRegistryGatewayRegistryPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayRegistryGatewayRegistryPaused represents a GatewayRegistryPaused event raised by the GatewayRegistry contract. +type GatewayRegistryGatewayRegistryPaused struct { + Onboards bool + Offboards bool + Updates bool + Transfers bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterGatewayRegistryPaused is a free log retrieval operation binding the contract event 0x0d30b4d10c0e924cbf1332f59500d2f843b7f4910bebc4e6347a492cf2dfdee5. +// +// Solidity: event GatewayRegistryPaused(bool onboards, bool offboards, bool updates, bool transfers) +func (_GatewayRegistry *GatewayRegistryFilterer) FilterGatewayRegistryPaused(opts *bind.FilterOpts) (*GatewayRegistryGatewayRegistryPausedIterator, error) { + + logs, sub, err := _GatewayRegistry.contract.FilterLogs(opts, "GatewayRegistryPaused") + if err != nil { + return nil, err + } + return &GatewayRegistryGatewayRegistryPausedIterator{contract: _GatewayRegistry.contract, event: "GatewayRegistryPaused", logs: logs, sub: sub}, nil +} + +// WatchGatewayRegistryPaused is a free log subscription operation binding the contract event 0x0d30b4d10c0e924cbf1332f59500d2f843b7f4910bebc4e6347a492cf2dfdee5. +// +// Solidity: event GatewayRegistryPaused(bool onboards, bool offboards, bool updates, bool transfers) +func (_GatewayRegistry *GatewayRegistryFilterer) WatchGatewayRegistryPaused(opts *bind.WatchOpts, sink chan<- *GatewayRegistryGatewayRegistryPaused) (event.Subscription, error) { + + logs, sub, err := _GatewayRegistry.contract.WatchLogs(opts, "GatewayRegistryPaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayRegistryGatewayRegistryPaused) + if err := _GatewayRegistry.contract.UnpackLog(event, "GatewayRegistryPaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseGatewayRegistryPaused is a log parse operation binding the contract event 0x0d30b4d10c0e924cbf1332f59500d2f843b7f4910bebc4e6347a492cf2dfdee5. +// +// Solidity: event GatewayRegistryPaused(bool onboards, bool offboards, bool updates, bool transfers) +func (_GatewayRegistry *GatewayRegistryFilterer) ParseGatewayRegistryPaused(log types.Log) (*GatewayRegistryGatewayRegistryPaused, error) { + event := new(GatewayRegistryGatewayRegistryPaused) + if err := _GatewayRegistry.contract.UnpackLog(event, "GatewayRegistryPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayRegistryGatewayTransferredIterator is returned from FilterGatewayTransferred and is used to iterate over the raw logs and unpacked data for GatewayTransferred events raised by the GatewayRegistry contract. +type GatewayRegistryGatewayTransferredIterator struct { + Event *GatewayRegistryGatewayTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GatewayRegistryGatewayTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryGatewayTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryGatewayTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayRegistryGatewayTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayRegistryGatewayTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayRegistryGatewayTransferred represents a GatewayTransferred event raised by the GatewayRegistry contract. +type GatewayRegistryGatewayTransferred struct { + GatewayId [32]byte + OldOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterGatewayTransferred is a free log retrieval operation binding the contract event 0xd83561db967da60f545e3a0538a24a25874f4aa9b3b14ac2e63415c8dea21c0e. +// +// Solidity: event GatewayTransferred(bytes32 indexed gatewayId, address indexed oldOwner, address indexed newOwner) +func (_GatewayRegistry *GatewayRegistryFilterer) FilterGatewayTransferred(opts *bind.FilterOpts, gatewayId [][32]byte, oldOwner []common.Address, newOwner []common.Address) (*GatewayRegistryGatewayTransferredIterator, error) { + + var gatewayIdRule []interface{} + for _, gatewayIdItem := range gatewayId { + gatewayIdRule = append(gatewayIdRule, gatewayIdItem) + } + var oldOwnerRule []interface{} + for _, oldOwnerItem := range oldOwner { + oldOwnerRule = append(oldOwnerRule, oldOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _GatewayRegistry.contract.FilterLogs(opts, "GatewayTransferred", gatewayIdRule, oldOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &GatewayRegistryGatewayTransferredIterator{contract: _GatewayRegistry.contract, event: "GatewayTransferred", logs: logs, sub: sub}, nil +} + +// WatchGatewayTransferred is a free log subscription operation binding the contract event 0xd83561db967da60f545e3a0538a24a25874f4aa9b3b14ac2e63415c8dea21c0e. +// +// Solidity: event GatewayTransferred(bytes32 indexed gatewayId, address indexed oldOwner, address indexed newOwner) +func (_GatewayRegistry *GatewayRegistryFilterer) WatchGatewayTransferred(opts *bind.WatchOpts, sink chan<- *GatewayRegistryGatewayTransferred, gatewayId [][32]byte, oldOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var gatewayIdRule []interface{} + for _, gatewayIdItem := range gatewayId { + gatewayIdRule = append(gatewayIdRule, gatewayIdItem) + } + var oldOwnerRule []interface{} + for _, oldOwnerItem := range oldOwner { + oldOwnerRule = append(oldOwnerRule, oldOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _GatewayRegistry.contract.WatchLogs(opts, "GatewayTransferred", gatewayIdRule, oldOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayRegistryGatewayTransferred) + if err := _GatewayRegistry.contract.UnpackLog(event, "GatewayTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseGatewayTransferred is a log parse operation binding the contract event 0xd83561db967da60f545e3a0538a24a25874f4aa9b3b14ac2e63415c8dea21c0e. +// +// Solidity: event GatewayTransferred(bytes32 indexed gatewayId, address indexed oldOwner, address indexed newOwner) +func (_GatewayRegistry *GatewayRegistryFilterer) ParseGatewayTransferred(log types.Log) (*GatewayRegistryGatewayTransferred, error) { + event := new(GatewayRegistryGatewayTransferred) + if err := _GatewayRegistry.contract.UnpackLog(event, "GatewayTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayRegistryGatewayUpdatedIterator is returned from FilterGatewayUpdated and is used to iterate over the raw logs and unpacked data for GatewayUpdated events raised by the GatewayRegistry contract. +type GatewayRegistryGatewayUpdatedIterator struct { + Event *GatewayRegistryGatewayUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GatewayRegistryGatewayUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryGatewayUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryGatewayUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayRegistryGatewayUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayRegistryGatewayUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayRegistryGatewayUpdated represents a GatewayUpdated event raised by the GatewayRegistry contract. +type GatewayRegistryGatewayUpdated struct { + GatewayId [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterGatewayUpdated is a free log retrieval operation binding the contract event 0x6d07f738d8b7adf4f097fc73b96bb18ceeebfc0d2274b8b8e138973b5dc84016. +// +// Solidity: event GatewayUpdated(bytes32 indexed gatewayId) +func (_GatewayRegistry *GatewayRegistryFilterer) FilterGatewayUpdated(opts *bind.FilterOpts, gatewayId [][32]byte) (*GatewayRegistryGatewayUpdatedIterator, error) { + + var gatewayIdRule []interface{} + for _, gatewayIdItem := range gatewayId { + gatewayIdRule = append(gatewayIdRule, gatewayIdItem) + } + + logs, sub, err := _GatewayRegistry.contract.FilterLogs(opts, "GatewayUpdated", gatewayIdRule) + if err != nil { + return nil, err + } + return &GatewayRegistryGatewayUpdatedIterator{contract: _GatewayRegistry.contract, event: "GatewayUpdated", logs: logs, sub: sub}, nil +} + +// WatchGatewayUpdated is a free log subscription operation binding the contract event 0x6d07f738d8b7adf4f097fc73b96bb18ceeebfc0d2274b8b8e138973b5dc84016. +// +// Solidity: event GatewayUpdated(bytes32 indexed gatewayId) +func (_GatewayRegistry *GatewayRegistryFilterer) WatchGatewayUpdated(opts *bind.WatchOpts, sink chan<- *GatewayRegistryGatewayUpdated, gatewayId [][32]byte) (event.Subscription, error) { + + var gatewayIdRule []interface{} + for _, gatewayIdItem := range gatewayId { + gatewayIdRule = append(gatewayIdRule, gatewayIdItem) + } + + logs, sub, err := _GatewayRegistry.contract.WatchLogs(opts, "GatewayUpdated", gatewayIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayRegistryGatewayUpdated) + if err := _GatewayRegistry.contract.UnpackLog(event, "GatewayUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseGatewayUpdated is a log parse operation binding the contract event 0x6d07f738d8b7adf4f097fc73b96bb18ceeebfc0d2274b8b8e138973b5dc84016. +// +// Solidity: event GatewayUpdated(bytes32 indexed gatewayId) +func (_GatewayRegistry *GatewayRegistryFilterer) ParseGatewayUpdated(log types.Log) (*GatewayRegistryGatewayUpdated, error) { + event := new(GatewayRegistryGatewayUpdated) + if err := _GatewayRegistry.contract.UnpackLog(event, "GatewayUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayRegistryRoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the GatewayRegistry contract. +type GatewayRegistryRoleAdminChangedIterator struct { + Event *GatewayRegistryRoleAdminChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GatewayRegistryRoleAdminChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryRoleAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryRoleAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayRegistryRoleAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayRegistryRoleAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayRegistryRoleAdminChanged represents a RoleAdminChanged event raised by the GatewayRegistry contract. +type GatewayRegistryRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_GatewayRegistry *GatewayRegistryFilterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*GatewayRegistryRoleAdminChangedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _GatewayRegistry.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return &GatewayRegistryRoleAdminChangedIterator{contract: _GatewayRegistry.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil +} + +// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_GatewayRegistry *GatewayRegistryFilterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *GatewayRegistryRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _GatewayRegistry.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayRegistryRoleAdminChanged) + if err := _GatewayRegistry.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_GatewayRegistry *GatewayRegistryFilterer) ParseRoleAdminChanged(log types.Log) (*GatewayRegistryRoleAdminChanged, error) { + event := new(GatewayRegistryRoleAdminChanged) + if err := _GatewayRegistry.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayRegistryRoleGrantedIterator is returned from FilterRoleGranted and is used to iterate over the raw logs and unpacked data for RoleGranted events raised by the GatewayRegistry contract. +type GatewayRegistryRoleGrantedIterator struct { + Event *GatewayRegistryRoleGranted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GatewayRegistryRoleGrantedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryRoleGranted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryRoleGranted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayRegistryRoleGrantedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayRegistryRoleGrantedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayRegistryRoleGranted represents a RoleGranted event raised by the GatewayRegistry contract. +type GatewayRegistryRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_GatewayRegistry *GatewayRegistryFilterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*GatewayRegistryRoleGrantedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _GatewayRegistry.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &GatewayRegistryRoleGrantedIterator{contract: _GatewayRegistry.contract, event: "RoleGranted", logs: logs, sub: sub}, nil +} + +// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_GatewayRegistry *GatewayRegistryFilterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *GatewayRegistryRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _GatewayRegistry.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayRegistryRoleGranted) + if err := _GatewayRegistry.contract.UnpackLog(event, "RoleGranted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_GatewayRegistry *GatewayRegistryFilterer) ParseRoleGranted(log types.Log) (*GatewayRegistryRoleGranted, error) { + event := new(GatewayRegistryRoleGranted) + if err := _GatewayRegistry.contract.UnpackLog(event, "RoleGranted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// GatewayRegistryRoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the GatewayRegistry contract. +type GatewayRegistryRoleRevokedIterator struct { + Event *GatewayRegistryRoleRevoked // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *GatewayRegistryRoleRevokedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryRoleRevoked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(GatewayRegistryRoleRevoked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *GatewayRegistryRoleRevokedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *GatewayRegistryRoleRevokedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// GatewayRegistryRoleRevoked represents a RoleRevoked event raised by the GatewayRegistry contract. +type GatewayRegistryRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_GatewayRegistry *GatewayRegistryFilterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*GatewayRegistryRoleRevokedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _GatewayRegistry.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &GatewayRegistryRoleRevokedIterator{contract: _GatewayRegistry.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil +} + +// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_GatewayRegistry *GatewayRegistryFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *GatewayRegistryRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _GatewayRegistry.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(GatewayRegistryRoleRevoked) + if err := _GatewayRegistry.contract.UnpackLog(event, "RoleRevoked", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_GatewayRegistry *GatewayRegistryFilterer) ParseRoleRevoked(log types.Log) (*GatewayRegistryRoleRevoked, error) { + event := new(GatewayRegistryRoleRevoked) + if err := _GatewayRegistry.contract.UnpackLog(event, "RoleRevoked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/check-license.sh b/check-license.sh new file mode 100755 index 0000000..46c5196 --- /dev/null +++ b/check-license.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# Copyright 2022 Stichting ThingsIX Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + + +# Adds a license to all code files, requires the https://github.com/google/addlicense tool to be installed +# Example for Go: addlicense -check -c "Stichting ThingsIX Foundation" -s -ignore "external/**" . | xargs -I %s -- echo "::error file=%s,line=1::Missing license header" +errors=$(addlicense -check -c "Stichting ThingsIX Foundation" -s .) +ret=$? +echo $errors | xargs -I %s -- echo "::error file=%s,line=1::Missing license header" +exit $ret diff --git a/generate-bindings.sh b/generate-bindings.sh new file mode 100755 index 0000000..e9d5878 --- /dev/null +++ b/generate-bindings.sh @@ -0,0 +1,51 @@ +#!/bin/sh +# Copyright 2022 Stichting ThingsIX Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + + +set -e + +THINGS_TOKEN_SMART_CONTRACT_REPO=git@github.com:ThingsIXFoundation/smart-contracts-evm.git + +generate_bindings() { + local work_dir=$1 + local pkg=$2 + local artifact_file=$(find $work_dir/artifacts -name "$3.json") + local abi_file="$work_dir/$3.abi" + + # extract abi from artifacts file + jq .abi "$artifact_file" > "$abi_file" + + echo "Generate bindings for package $pkg" + + abigen --abi "$abi_file" --pkg $pkg --out "bindings.go" +} + +# clone smart contract repo and install dependencies +work_dir=$(mktemp -d /tmp/thingsix-tokens-XXXXX) +echo "Clone smart contract repo in work directory $work_dir" +git clone $THINGS_TOKEN_SMART_CONTRACT_REPO $work_dir --quiet + +# generate go-bindings for gateway registry contract +generate_bindings $work_dir gateway_registry GatewayRegistry + +# cleanup work directory +echo "delete work directory" +rm -rf $work_dir + +# install dependencies +echo "tidy go dependencies" +go mod tidy \ No newline at end of file diff --git a/generate.go b/generate.go new file mode 100644 index 0000000..f9028ba --- /dev/null +++ b/generate.go @@ -0,0 +1,18 @@ +// Copyright 2022 Stichting ThingsIX Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +//go:generate ./generate-bindings.sh +package gateway_registry diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..acfbf5c --- /dev/null +++ b/go.mod @@ -0,0 +1,23 @@ +module github.com/ThingsIXFoundation/gateway-registry-go + +go 1.19 + +require github.com/ethereum/go-ethereum v1.10.23 + +require ( + github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect + github.com/deckarep/golang-set v1.8.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect + github.com/go-ole/go-ole v1.2.1 // indirect + github.com/go-stack/stack v1.8.0 // indirect + github.com/google/uuid v1.2.0 // indirect + github.com/gorilla/websocket v1.4.2 // indirect + github.com/rjeczalik/notify v0.9.1 // indirect + github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect + github.com/tklauser/go-sysconf v0.3.5 // indirect + github.com/tklauser/numcpus v0.2.2 // indirect + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..e48a7c3 --- /dev/null +++ b/go.sum @@ -0,0 +1,53 @@ +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= +github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= +github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= +github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= +github.com/ethereum/go-ethereum v1.10.23 h1:Xk8XAT4/UuqcjMLIMF+7imjkg32kfVFKoeyQDaO2yWM= +github.com/ethereum/go-ethereum v1.10.23/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= +github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= +github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= +github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= +github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA= +github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=