// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.

package blockchain

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
	_ = abi.ConvertType
)

// BlockchainMetaData contains all meta data concerning the Blockchain contract.
var BlockchainMetaData = &bind.MetaData{
	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"deviceId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"addIOTData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"}],\"name\":\"createContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getContracts\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"deviceId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"}],\"name\":\"getDataByContractId\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"deviceId\",\"type\":\"bytes32\"}],\"name\":\"getDataByDeviceId\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"}],\"name\":\"getDevicesIds\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"deviceId\",\"type\":\"bytes32\"}],\"name\":\"getTimestampsForDevice\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"}],\"name\":\"isContractExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"deviceId\",\"type\":\"bytes32\"}],\"name\":\"isDeviceExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"deviceId\",\"type\":\"bytes32\"}],\"name\":\"registerNewDeviceId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"_deviceIds\",\"type\":\"bytes32[]\"}],\"name\":\"registerNewDeviceIds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"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\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}

// BlockchainABI is the input ABI used to generate the binding from.
// Deprecated: Use BlockchainMetaData.ABI instead.
var BlockchainABI = BlockchainMetaData.ABI

// Blockchain is an auto generated Go binding around an Ethereum contract.
type Blockchain struct {
	BlockchainCaller     // Read-only binding to the contract
	BlockchainTransactor // Write-only binding to the contract
	BlockchainFilterer   // Log filterer for contract events
}

// BlockchainCaller is an auto generated read-only Go binding around an Ethereum contract.
type BlockchainCaller struct {
	contract *bind.BoundContract // Generic contract wrapper for the low level calls
}

// BlockchainTransactor is an auto generated write-only Go binding around an Ethereum contract.
type BlockchainTransactor struct {
	contract *bind.BoundContract // Generic contract wrapper for the low level calls
}

// BlockchainFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type BlockchainFilterer struct {
	contract *bind.BoundContract // Generic contract wrapper for the low level calls
}

// BlockchainSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type BlockchainSession struct {
	Contract     *Blockchain       // 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
}

// BlockchainCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type BlockchainCallerSession struct {
	Contract *BlockchainCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts     // Call options to use throughout this session
}

// BlockchainTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type BlockchainTransactorSession struct {
	Contract     *BlockchainTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts     // Transaction auth options to use throughout this session
}

// BlockchainRaw is an auto generated low-level Go binding around an Ethereum contract.
type BlockchainRaw struct {
	Contract *Blockchain // Generic contract binding to access the raw methods on
}

// BlockchainCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type BlockchainCallerRaw struct {
	Contract *BlockchainCaller // Generic read-only contract binding to access the raw methods on
}

// BlockchainTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type BlockchainTransactorRaw struct {
	Contract *BlockchainTransactor // Generic write-only contract binding to access the raw methods on
}

// NewBlockchain creates a new instance of Blockchain, bound to a specific deployed contract.
func NewBlockchain(address common.Address, backend bind.ContractBackend) (*Blockchain, error) {
	contract, err := bindBlockchain(address, backend, backend, backend)
	if err != nil {
		return nil, err
	}
	return &Blockchain{BlockchainCaller: BlockchainCaller{contract: contract}, BlockchainTransactor: BlockchainTransactor{contract: contract}, BlockchainFilterer: BlockchainFilterer{contract: contract}}, nil
}

// NewBlockchainCaller creates a new read-only instance of Blockchain, bound to a specific deployed contract.
func NewBlockchainCaller(address common.Address, caller bind.ContractCaller) (*BlockchainCaller, error) {
	contract, err := bindBlockchain(address, caller, nil, nil)
	if err != nil {
		return nil, err
	}
	return &BlockchainCaller{contract: contract}, nil
}

// NewBlockchainTransactor creates a new write-only instance of Blockchain, bound to a specific deployed contract.
func NewBlockchainTransactor(address common.Address, transactor bind.ContractTransactor) (*BlockchainTransactor, error) {
	contract, err := bindBlockchain(address, nil, transactor, nil)
	if err != nil {
		return nil, err
	}
	return &BlockchainTransactor{contract: contract}, nil
}

// NewBlockchainFilterer creates a new log filterer instance of Blockchain, bound to a specific deployed contract.
func NewBlockchainFilterer(address common.Address, filterer bind.ContractFilterer) (*BlockchainFilterer, error) {
	contract, err := bindBlockchain(address, nil, nil, filterer)
	if err != nil {
		return nil, err
	}
	return &BlockchainFilterer{contract: contract}, nil
}

// bindBlockchain binds a generic wrapper to an already deployed contract.
func bindBlockchain(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
	parsed, err := BlockchainMetaData.GetAbi()
	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 (_Blockchain *BlockchainRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
	return _Blockchain.Contract.BlockchainCaller.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 (_Blockchain *BlockchainRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _Blockchain.Contract.BlockchainTransactor.contract.Transfer(opts)
}

// Transact invokes the (paid) contract method with params as input values.
func (_Blockchain *BlockchainRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
	return _Blockchain.Contract.BlockchainTransactor.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 (_Blockchain *BlockchainCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
	return _Blockchain.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 (_Blockchain *BlockchainTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _Blockchain.Contract.contract.Transfer(opts)
}

// Transact invokes the (paid) contract method with params as input values.
func (_Blockchain *BlockchainTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
	return _Blockchain.Contract.contract.Transact(opts, method, params...)
}

// GetContracts is a free data retrieval call binding the contract method 0xc3a2a93a.
//
// Solidity: function getContracts() view returns(bytes32[])
func (_Blockchain *BlockchainCaller) GetContracts(opts *bind.CallOpts) ([][32]byte, error) {
	var out []interface{}
	err := _Blockchain.contract.Call(opts, &out, "getContracts")

	if err != nil {
		return *new([][32]byte), err
	}

	out0 := *abi.ConvertType(out[0], new([][32]byte)).(*[][32]byte)

	return out0, err

}

// GetContracts is a free data retrieval call binding the contract method 0xc3a2a93a.
//
// Solidity: function getContracts() view returns(bytes32[])
func (_Blockchain *BlockchainSession) GetContracts() ([][32]byte, error) {
	return _Blockchain.Contract.GetContracts(&_Blockchain.CallOpts)
}

// GetContracts is a free data retrieval call binding the contract method 0xc3a2a93a.
//
// Solidity: function getContracts() view returns(bytes32[])
func (_Blockchain *BlockchainCallerSession) GetContracts() ([][32]byte, error) {
	return _Blockchain.Contract.GetContracts(&_Blockchain.CallOpts)
}

// GetData is a free data retrieval call binding the contract method 0x164b2f16.
//
// Solidity: function getData(bytes32 contractId, bytes32 deviceId, uint256 timestamp) view returns(bytes)
func (_Blockchain *BlockchainCaller) GetData(opts *bind.CallOpts, contractId [32]byte, deviceId [32]byte, timestamp *big.Int) ([]byte, error) {
	var out []interface{}
	err := _Blockchain.contract.Call(opts, &out, "getData", contractId, deviceId, timestamp)

	if err != nil {
		return *new([]byte), err
	}

	out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte)

	return out0, err

}

// GetData is a free data retrieval call binding the contract method 0x164b2f16.
//
// Solidity: function getData(bytes32 contractId, bytes32 deviceId, uint256 timestamp) view returns(bytes)
func (_Blockchain *BlockchainSession) GetData(contractId [32]byte, deviceId [32]byte, timestamp *big.Int) ([]byte, error) {
	return _Blockchain.Contract.GetData(&_Blockchain.CallOpts, contractId, deviceId, timestamp)
}

// GetData is a free data retrieval call binding the contract method 0x164b2f16.
//
// Solidity: function getData(bytes32 contractId, bytes32 deviceId, uint256 timestamp) view returns(bytes)
func (_Blockchain *BlockchainCallerSession) GetData(contractId [32]byte, deviceId [32]byte, timestamp *big.Int) ([]byte, error) {
	return _Blockchain.Contract.GetData(&_Blockchain.CallOpts, contractId, deviceId, timestamp)
}

// GetDataByContractId is a free data retrieval call binding the contract method 0xc3dfe0be.
//
// Solidity: function getDataByContractId(bytes32 contractId) view returns(bytes _data)
func (_Blockchain *BlockchainCaller) GetDataByContractId(opts *bind.CallOpts, contractId [32]byte) ([]byte, error) {
	var out []interface{}
	err := _Blockchain.contract.Call(opts, &out, "getDataByContractId", contractId)

	if err != nil {
		return *new([]byte), err
	}

	out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte)

	return out0, err

}

// GetDataByContractId is a free data retrieval call binding the contract method 0xc3dfe0be.
//
// Solidity: function getDataByContractId(bytes32 contractId) view returns(bytes _data)
func (_Blockchain *BlockchainSession) GetDataByContractId(contractId [32]byte) ([]byte, error) {
	return _Blockchain.Contract.GetDataByContractId(&_Blockchain.CallOpts, contractId)
}

// GetDataByContractId is a free data retrieval call binding the contract method 0xc3dfe0be.
//
// Solidity: function getDataByContractId(bytes32 contractId) view returns(bytes _data)
func (_Blockchain *BlockchainCallerSession) GetDataByContractId(contractId [32]byte) ([]byte, error) {
	return _Blockchain.Contract.GetDataByContractId(&_Blockchain.CallOpts, contractId)
}

// GetDataByDeviceId is a free data retrieval call binding the contract method 0x7e0411dc.
//
// Solidity: function getDataByDeviceId(bytes32 contractId, bytes32 deviceId) view returns(bytes _data)
func (_Blockchain *BlockchainCaller) GetDataByDeviceId(opts *bind.CallOpts, contractId [32]byte, deviceId [32]byte) ([]byte, error) {
	var out []interface{}
	err := _Blockchain.contract.Call(opts, &out, "getDataByDeviceId", contractId, deviceId)

	if err != nil {
		return *new([]byte), err
	}

	out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte)

	return out0, err

}

// GetDataByDeviceId is a free data retrieval call binding the contract method 0x7e0411dc.
//
// Solidity: function getDataByDeviceId(bytes32 contractId, bytes32 deviceId) view returns(bytes _data)
func (_Blockchain *BlockchainSession) GetDataByDeviceId(contractId [32]byte, deviceId [32]byte) ([]byte, error) {
	return _Blockchain.Contract.GetDataByDeviceId(&_Blockchain.CallOpts, contractId, deviceId)
}

// GetDataByDeviceId is a free data retrieval call binding the contract method 0x7e0411dc.
//
// Solidity: function getDataByDeviceId(bytes32 contractId, bytes32 deviceId) view returns(bytes _data)
func (_Blockchain *BlockchainCallerSession) GetDataByDeviceId(contractId [32]byte, deviceId [32]byte) ([]byte, error) {
	return _Blockchain.Contract.GetDataByDeviceId(&_Blockchain.CallOpts, contractId, deviceId)
}

// GetDevicesIds is a free data retrieval call binding the contract method 0xc0789e40.
//
// Solidity: function getDevicesIds(bytes32 contractId) view returns(bytes32[])
func (_Blockchain *BlockchainCaller) GetDevicesIds(opts *bind.CallOpts, contractId [32]byte) ([][32]byte, error) {
	var out []interface{}
	err := _Blockchain.contract.Call(opts, &out, "getDevicesIds", contractId)

	if err != nil {
		return *new([][32]byte), err
	}

	out0 := *abi.ConvertType(out[0], new([][32]byte)).(*[][32]byte)

	return out0, err

}

// GetDevicesIds is a free data retrieval call binding the contract method 0xc0789e40.
//
// Solidity: function getDevicesIds(bytes32 contractId) view returns(bytes32[])
func (_Blockchain *BlockchainSession) GetDevicesIds(contractId [32]byte) ([][32]byte, error) {
	return _Blockchain.Contract.GetDevicesIds(&_Blockchain.CallOpts, contractId)
}

// GetDevicesIds is a free data retrieval call binding the contract method 0xc0789e40.
//
// Solidity: function getDevicesIds(bytes32 contractId) view returns(bytes32[])
func (_Blockchain *BlockchainCallerSession) GetDevicesIds(contractId [32]byte) ([][32]byte, error) {
	return _Blockchain.Contract.GetDevicesIds(&_Blockchain.CallOpts, contractId)
}

// GetTimestampsForDevice is a free data retrieval call binding the contract method 0x6254aad3.
//
// Solidity: function getTimestampsForDevice(bytes32 contractId, bytes32 deviceId) view returns(uint256[])
func (_Blockchain *BlockchainCaller) GetTimestampsForDevice(opts *bind.CallOpts, contractId [32]byte, deviceId [32]byte) ([]*big.Int, error) {
	var out []interface{}
	err := _Blockchain.contract.Call(opts, &out, "getTimestampsForDevice", contractId, deviceId)

	if err != nil {
		return *new([]*big.Int), err
	}

	out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int)

	return out0, err

}

// GetTimestampsForDevice is a free data retrieval call binding the contract method 0x6254aad3.
//
// Solidity: function getTimestampsForDevice(bytes32 contractId, bytes32 deviceId) view returns(uint256[])
func (_Blockchain *BlockchainSession) GetTimestampsForDevice(contractId [32]byte, deviceId [32]byte) ([]*big.Int, error) {
	return _Blockchain.Contract.GetTimestampsForDevice(&_Blockchain.CallOpts, contractId, deviceId)
}

// GetTimestampsForDevice is a free data retrieval call binding the contract method 0x6254aad3.
//
// Solidity: function getTimestampsForDevice(bytes32 contractId, bytes32 deviceId) view returns(uint256[])
func (_Blockchain *BlockchainCallerSession) GetTimestampsForDevice(contractId [32]byte, deviceId [32]byte) ([]*big.Int, error) {
	return _Blockchain.Contract.GetTimestampsForDevice(&_Blockchain.CallOpts, contractId, deviceId)
}

// IsContractExists is a free data retrieval call binding the contract method 0x0eb18461.
//
// Solidity: function isContractExists(bytes32 contractId) view returns(bool)
func (_Blockchain *BlockchainCaller) IsContractExists(opts *bind.CallOpts, contractId [32]byte) (bool, error) {
	var out []interface{}
	err := _Blockchain.contract.Call(opts, &out, "isContractExists", contractId)

	if err != nil {
		return *new(bool), err
	}

	out0 := *abi.ConvertType(out[0], new(bool)).(*bool)

	return out0, err

}

// IsContractExists is a free data retrieval call binding the contract method 0x0eb18461.
//
// Solidity: function isContractExists(bytes32 contractId) view returns(bool)
func (_Blockchain *BlockchainSession) IsContractExists(contractId [32]byte) (bool, error) {
	return _Blockchain.Contract.IsContractExists(&_Blockchain.CallOpts, contractId)
}

// IsContractExists is a free data retrieval call binding the contract method 0x0eb18461.
//
// Solidity: function isContractExists(bytes32 contractId) view returns(bool)
func (_Blockchain *BlockchainCallerSession) IsContractExists(contractId [32]byte) (bool, error) {
	return _Blockchain.Contract.IsContractExists(&_Blockchain.CallOpts, contractId)
}

// IsDeviceExists is a free data retrieval call binding the contract method 0xba12b630.
//
// Solidity: function isDeviceExists(bytes32 contractId, bytes32 deviceId) view returns(bool)
func (_Blockchain *BlockchainCaller) IsDeviceExists(opts *bind.CallOpts, contractId [32]byte, deviceId [32]byte) (bool, error) {
	var out []interface{}
	err := _Blockchain.contract.Call(opts, &out, "isDeviceExists", contractId, deviceId)

	if err != nil {
		return *new(bool), err
	}

	out0 := *abi.ConvertType(out[0], new(bool)).(*bool)

	return out0, err

}

// IsDeviceExists is a free data retrieval call binding the contract method 0xba12b630.
//
// Solidity: function isDeviceExists(bytes32 contractId, bytes32 deviceId) view returns(bool)
func (_Blockchain *BlockchainSession) IsDeviceExists(contractId [32]byte, deviceId [32]byte) (bool, error) {
	return _Blockchain.Contract.IsDeviceExists(&_Blockchain.CallOpts, contractId, deviceId)
}

// IsDeviceExists is a free data retrieval call binding the contract method 0xba12b630.
//
// Solidity: function isDeviceExists(bytes32 contractId, bytes32 deviceId) view returns(bool)
func (_Blockchain *BlockchainCallerSession) IsDeviceExists(contractId [32]byte, deviceId [32]byte) (bool, error) {
	return _Blockchain.Contract.IsDeviceExists(&_Blockchain.CallOpts, contractId, deviceId)
}

// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Blockchain *BlockchainCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
	var out []interface{}
	err := _Blockchain.contract.Call(opts, &out, "owner")

	if err != nil {
		return *new(common.Address), err
	}

	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)

	return out0, err

}

// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Blockchain *BlockchainSession) Owner() (common.Address, error) {
	return _Blockchain.Contract.Owner(&_Blockchain.CallOpts)
}

// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Blockchain *BlockchainCallerSession) Owner() (common.Address, error) {
	return _Blockchain.Contract.Owner(&_Blockchain.CallOpts)
}

// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
//
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
func (_Blockchain *BlockchainCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
	var out []interface{}
	err := _Blockchain.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 (_Blockchain *BlockchainSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
	return _Blockchain.Contract.SupportsInterface(&_Blockchain.CallOpts, interfaceId)
}

// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
//
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
func (_Blockchain *BlockchainCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
	return _Blockchain.Contract.SupportsInterface(&_Blockchain.CallOpts, interfaceId)
}

// AddIOTData is a paid mutator transaction binding the contract method 0x5d76f5c9.
//
// Solidity: function addIOTData(bytes32 contractId, bytes32 deviceId, uint256 timestamp, bytes _data) returns()
func (_Blockchain *BlockchainTransactor) AddIOTData(opts *bind.TransactOpts, contractId [32]byte, deviceId [32]byte, timestamp *big.Int, _data []byte) (*types.Transaction, error) {
	return _Blockchain.contract.Transact(opts, "addIOTData", contractId, deviceId, timestamp, _data)
}

// AddIOTData is a paid mutator transaction binding the contract method 0x5d76f5c9.
//
// Solidity: function addIOTData(bytes32 contractId, bytes32 deviceId, uint256 timestamp, bytes _data) returns()
func (_Blockchain *BlockchainSession) AddIOTData(contractId [32]byte, deviceId [32]byte, timestamp *big.Int, _data []byte) (*types.Transaction, error) {
	return _Blockchain.Contract.AddIOTData(&_Blockchain.TransactOpts, contractId, deviceId, timestamp, _data)
}

// AddIOTData is a paid mutator transaction binding the contract method 0x5d76f5c9.
//
// Solidity: function addIOTData(bytes32 contractId, bytes32 deviceId, uint256 timestamp, bytes _data) returns()
func (_Blockchain *BlockchainTransactorSession) AddIOTData(contractId [32]byte, deviceId [32]byte, timestamp *big.Int, _data []byte) (*types.Transaction, error) {
	return _Blockchain.Contract.AddIOTData(&_Blockchain.TransactOpts, contractId, deviceId, timestamp, _data)
}

// CreateContract is a paid mutator transaction binding the contract method 0x3f811b80.
//
// Solidity: function createContract(bytes32 contractId) returns()
func (_Blockchain *BlockchainTransactor) CreateContract(opts *bind.TransactOpts, contractId [32]byte) (*types.Transaction, error) {
	return _Blockchain.contract.Transact(opts, "createContract", contractId)
}

// CreateContract is a paid mutator transaction binding the contract method 0x3f811b80.
//
// Solidity: function createContract(bytes32 contractId) returns()
func (_Blockchain *BlockchainSession) CreateContract(contractId [32]byte) (*types.Transaction, error) {
	return _Blockchain.Contract.CreateContract(&_Blockchain.TransactOpts, contractId)
}

// CreateContract is a paid mutator transaction binding the contract method 0x3f811b80.
//
// Solidity: function createContract(bytes32 contractId) returns()
func (_Blockchain *BlockchainTransactorSession) CreateContract(contractId [32]byte) (*types.Transaction, error) {
	return _Blockchain.Contract.CreateContract(&_Blockchain.TransactOpts, contractId)
}

// RegisterNewDeviceId is a paid mutator transaction binding the contract method 0x73b5a2e6.
//
// Solidity: function registerNewDeviceId(bytes32 contractId, bytes32 deviceId) returns()
func (_Blockchain *BlockchainTransactor) RegisterNewDeviceId(opts *bind.TransactOpts, contractId [32]byte, deviceId [32]byte) (*types.Transaction, error) {
	return _Blockchain.contract.Transact(opts, "registerNewDeviceId", contractId, deviceId)
}

// RegisterNewDeviceId is a paid mutator transaction binding the contract method 0x73b5a2e6.
//
// Solidity: function registerNewDeviceId(bytes32 contractId, bytes32 deviceId) returns()
func (_Blockchain *BlockchainSession) RegisterNewDeviceId(contractId [32]byte, deviceId [32]byte) (*types.Transaction, error) {
	return _Blockchain.Contract.RegisterNewDeviceId(&_Blockchain.TransactOpts, contractId, deviceId)
}

// RegisterNewDeviceId is a paid mutator transaction binding the contract method 0x73b5a2e6.
//
// Solidity: function registerNewDeviceId(bytes32 contractId, bytes32 deviceId) returns()
func (_Blockchain *BlockchainTransactorSession) RegisterNewDeviceId(contractId [32]byte, deviceId [32]byte) (*types.Transaction, error) {
	return _Blockchain.Contract.RegisterNewDeviceId(&_Blockchain.TransactOpts, contractId, deviceId)
}

// RegisterNewDeviceIds is a paid mutator transaction binding the contract method 0xec9e8a8e.
//
// Solidity: function registerNewDeviceIds(bytes32 contractId, bytes32[] _deviceIds) returns()
func (_Blockchain *BlockchainTransactor) RegisterNewDeviceIds(opts *bind.TransactOpts, contractId [32]byte, _deviceIds [][32]byte) (*types.Transaction, error) {
	return _Blockchain.contract.Transact(opts, "registerNewDeviceIds", contractId, _deviceIds)
}

// RegisterNewDeviceIds is a paid mutator transaction binding the contract method 0xec9e8a8e.
//
// Solidity: function registerNewDeviceIds(bytes32 contractId, bytes32[] _deviceIds) returns()
func (_Blockchain *BlockchainSession) RegisterNewDeviceIds(contractId [32]byte, _deviceIds [][32]byte) (*types.Transaction, error) {
	return _Blockchain.Contract.RegisterNewDeviceIds(&_Blockchain.TransactOpts, contractId, _deviceIds)
}

// RegisterNewDeviceIds is a paid mutator transaction binding the contract method 0xec9e8a8e.
//
// Solidity: function registerNewDeviceIds(bytes32 contractId, bytes32[] _deviceIds) returns()
func (_Blockchain *BlockchainTransactorSession) RegisterNewDeviceIds(contractId [32]byte, _deviceIds [][32]byte) (*types.Transaction, error) {
	return _Blockchain.Contract.RegisterNewDeviceIds(&_Blockchain.TransactOpts, contractId, _deviceIds)
}

// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Blockchain *BlockchainTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _Blockchain.contract.Transact(opts, "renounceOwnership")
}

// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Blockchain *BlockchainSession) RenounceOwnership() (*types.Transaction, error) {
	return _Blockchain.Contract.RenounceOwnership(&_Blockchain.TransactOpts)
}

// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Blockchain *BlockchainTransactorSession) RenounceOwnership() (*types.Transaction, error) {
	return _Blockchain.Contract.RenounceOwnership(&_Blockchain.TransactOpts)
}

// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Blockchain *BlockchainTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
	return _Blockchain.contract.Transact(opts, "transferOwnership", newOwner)
}

// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Blockchain *BlockchainSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
	return _Blockchain.Contract.TransferOwnership(&_Blockchain.TransactOpts, newOwner)
}

// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Blockchain *BlockchainTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
	return _Blockchain.Contract.TransferOwnership(&_Blockchain.TransactOpts, newOwner)
}

// BlockchainOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Blockchain contract.
type BlockchainOwnershipTransferredIterator struct {
	Event *BlockchainOwnershipTransferred // 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 *BlockchainOwnershipTransferredIterator) 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(BlockchainOwnershipTransferred)
			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(BlockchainOwnershipTransferred)
		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 *BlockchainOwnershipTransferredIterator) Error() error {
	return it.fail
}

// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *BlockchainOwnershipTransferredIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

// BlockchainOwnershipTransferred represents a OwnershipTransferred event raised by the Blockchain contract.
type BlockchainOwnershipTransferred struct {
	PreviousOwner common.Address
	NewOwner      common.Address
	Raw           types.Log // Blockchain specific contextual infos
}

// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_Blockchain *BlockchainFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BlockchainOwnershipTransferredIterator, error) {

	var previousOwnerRule []interface{}
	for _, previousOwnerItem := range previousOwner {
		previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
	}
	var newOwnerRule []interface{}
	for _, newOwnerItem := range newOwner {
		newOwnerRule = append(newOwnerRule, newOwnerItem)
	}

	logs, sub, err := _Blockchain.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
	if err != nil {
		return nil, err
	}
	return &BlockchainOwnershipTransferredIterator{contract: _Blockchain.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
}

// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_Blockchain *BlockchainFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BlockchainOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {

	var previousOwnerRule []interface{}
	for _, previousOwnerItem := range previousOwner {
		previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
	}
	var newOwnerRule []interface{}
	for _, newOwnerItem := range newOwner {
		newOwnerRule = append(newOwnerRule, newOwnerItem)
	}

	logs, sub, err := _Blockchain.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, 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(BlockchainOwnershipTransferred)
				if err := _Blockchain.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
					return err
				}
				event.Raw = log

				select {
				case sink <- event:
				case err := <-sub.Err():
					return err
				case <-quit:
					return nil
				}
			case err := <-sub.Err():
				return err
			case <-quit:
				return nil
			}
		}
	}), nil
}

// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_Blockchain *BlockchainFilterer) ParseOwnershipTransferred(log types.Log) (*BlockchainOwnershipTransferred, error) {
	event := new(BlockchainOwnershipTransferred)
	if err := _Blockchain.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
		return nil, err
	}
	event.Raw = log
	return event, nil
}
