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

package abi

import (
	"math/big"
	"strings"

	ethereum "energi.world/core/gen3"
	"energi.world/core/gen3/accounts/abi"
	"energi.world/core/gen3/accounts/abi/bind"
	"energi.world/core/gen3/common"
	"energi.world/core/gen3/core/types"
	"energi.world/core/gen3/event"
)

// Reference imports to suppress errors if they are not otherwise used.
var (
	_ = big.NewInt
	_ = strings.NewReader
	_ = ethereum.NotFound
	_ = abi.U256
	_ = bind.Bind
	_ = common.Big1
	_ = types.BloomLookup
	_ = event.NewSubscription
)

// StorageCheckpointRegistryV2ABI is the input ABI used to generate the binding from.
const StorageCheckpointRegistryV2ABI = "[{\"constant\":false,\"inputs\":[{\"internalType\":\"contractICheckpoint\",\"name\":\"cp\",\"type\":\"address\"}],\"name\":\"add\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"contractICheckpoint\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"kill\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"listCheckpoints\",\"outputs\":[{\"internalType\":\"contractICheckpoint[]\",\"name\":\"res\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pop\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractICheckpoint\",\"name\":\"cp\",\"type\":\"address\"}],\"name\":\"remove\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"found\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractIGovernedContract\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"

// StorageCheckpointRegistryV2Bin is the compiled bytecode used for deploying new contracts.
const StorageCheckpointRegistryV2Bin = ` `

// DeployStorageCheckpointRegistryV2 deploys a new Ethereum contract, binding an instance of StorageCheckpointRegistryV2 to it.
func DeployStorageCheckpointRegistryV2(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *StorageCheckpointRegistryV2, error) {
	parsed, err := abi.JSON(strings.NewReader(StorageCheckpointRegistryV2ABI))
	if err != nil {
		return common.Address{}, nil, nil, err
	}
	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(StorageCheckpointRegistryV2Bin), backend)
	if err != nil {
		return common.Address{}, nil, nil, err
	}
	return address, tx, &StorageCheckpointRegistryV2{StorageCheckpointRegistryV2Caller: StorageCheckpointRegistryV2Caller{contract: contract}, StorageCheckpointRegistryV2Transactor: StorageCheckpointRegistryV2Transactor{contract: contract}, StorageCheckpointRegistryV2Filterer: StorageCheckpointRegistryV2Filterer{contract: contract}}, nil
}

// StorageCheckpointRegistryV2Bin is the compiled bytecode of contract after deployment.
const StorageCheckpointRegistryV2RuntimeBin = ` `

// StorageCheckpointRegistryV2 is an auto generated Go binding around an Ethereum contract.
type StorageCheckpointRegistryV2 struct {
	StorageCheckpointRegistryV2Caller     // Read-only binding to the contract
	StorageCheckpointRegistryV2Transactor // Write-only binding to the contract
	StorageCheckpointRegistryV2Filterer   // Log filterer for contract events
}

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

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

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

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

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

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

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

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

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

// NewStorageCheckpointRegistryV2 creates a new instance of StorageCheckpointRegistryV2, bound to a specific deployed contract.
func NewStorageCheckpointRegistryV2(address common.Address, backend bind.ContractBackend) (*StorageCheckpointRegistryV2, error) {
	contract, err := bindStorageCheckpointRegistryV2(address, backend, backend, backend)
	if err != nil {
		return nil, err
	}
	return &StorageCheckpointRegistryV2{StorageCheckpointRegistryV2Caller: StorageCheckpointRegistryV2Caller{contract: contract}, StorageCheckpointRegistryV2Transactor: StorageCheckpointRegistryV2Transactor{contract: contract}, StorageCheckpointRegistryV2Filterer: StorageCheckpointRegistryV2Filterer{contract: contract}}, nil
}

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

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

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

// bindStorageCheckpointRegistryV2 binds a generic wrapper to an already deployed contract.
func bindStorageCheckpointRegistryV2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
	parsed, err := abi.JSON(strings.NewReader(StorageCheckpointRegistryV2ABI))
	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 (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
	return _StorageCheckpointRegistryV2.Contract.StorageCheckpointRegistryV2Caller.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 (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.StorageCheckpointRegistryV2Transactor.contract.Transfer(opts)
}

// Transact invokes the (paid) contract method with params as input values.
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.StorageCheckpointRegistryV2Transactor.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 (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
	return _StorageCheckpointRegistryV2.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 (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.contract.Transfer(opts)
}

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

// Checkpoints is a free data retrieval call binding the contract method 0xb8a24252.
//
// Solidity: function checkpoints(uint256 ) constant returns(address)
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Caller) Checkpoints(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) {
	var (
		ret0 = new(common.Address)
	)
	out := ret0
	err := _StorageCheckpointRegistryV2.contract.Call(opts, out, "checkpoints", arg0)
	return *ret0, err
}

// Checkpoints is a free data retrieval call binding the contract method 0xb8a24252.
//
// Solidity: function checkpoints(uint256 ) constant returns(address)
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Session) Checkpoints(arg0 *big.Int) (common.Address, error) {
	return _StorageCheckpointRegistryV2.Contract.Checkpoints(&_StorageCheckpointRegistryV2.CallOpts, arg0)
}

// Checkpoints is a free data retrieval call binding the contract method 0xb8a24252.
//
// Solidity: function checkpoints(uint256 ) constant returns(address)
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2CallerSession) Checkpoints(arg0 *big.Int) (common.Address, error) {
	return _StorageCheckpointRegistryV2.Contract.Checkpoints(&_StorageCheckpointRegistryV2.CallOpts, arg0)
}

// ListCheckpoints is a free data retrieval call binding the contract method 0xd9592ead.
//
// Solidity: function listCheckpoints() constant returns(address[] res)
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Caller) ListCheckpoints(opts *bind.CallOpts) ([]common.Address, error) {
	var (
		ret0 = new([]common.Address)
	)
	out := ret0
	err := _StorageCheckpointRegistryV2.contract.Call(opts, out, "listCheckpoints")
	return *ret0, err
}

// ListCheckpoints is a free data retrieval call binding the contract method 0xd9592ead.
//
// Solidity: function listCheckpoints() constant returns(address[] res)
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Session) ListCheckpoints() ([]common.Address, error) {
	return _StorageCheckpointRegistryV2.Contract.ListCheckpoints(&_StorageCheckpointRegistryV2.CallOpts)
}

// ListCheckpoints is a free data retrieval call binding the contract method 0xd9592ead.
//
// Solidity: function listCheckpoints() constant returns(address[] res)
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2CallerSession) ListCheckpoints() ([]common.Address, error) {
	return _StorageCheckpointRegistryV2.Contract.ListCheckpoints(&_StorageCheckpointRegistryV2.CallOpts)
}

// Add is a paid mutator transaction binding the contract method 0x0a3b0a4f.
//
// Solidity: function add(address cp) returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Transactor) Add(opts *bind.TransactOpts, cp common.Address) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.contract.Transact(opts, "add", cp)
}

// Add is a paid mutator transaction binding the contract method 0x0a3b0a4f.
//
// Solidity: function add(address cp) returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Session) Add(cp common.Address) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.Add(&_StorageCheckpointRegistryV2.TransactOpts, cp)
}

// Add is a paid mutator transaction binding the contract method 0x0a3b0a4f.
//
// Solidity: function add(address cp) returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2TransactorSession) Add(cp common.Address) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.Add(&_StorageCheckpointRegistryV2.TransactOpts, cp)
}

// Kill is a paid mutator transaction binding the contract method 0x41c0e1b5.
//
// Solidity: function kill() returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Transactor) Kill(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.contract.Transact(opts, "kill")
}

// Kill is a paid mutator transaction binding the contract method 0x41c0e1b5.
//
// Solidity: function kill() returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Session) Kill() (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.Kill(&_StorageCheckpointRegistryV2.TransactOpts)
}

// Kill is a paid mutator transaction binding the contract method 0x41c0e1b5.
//
// Solidity: function kill() returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2TransactorSession) Kill() (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.Kill(&_StorageCheckpointRegistryV2.TransactOpts)
}

// Pop is a paid mutator transaction binding the contract method 0xa4ece52c.
//
// Solidity: function pop() returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Transactor) Pop(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.contract.Transact(opts, "pop")
}

// Pop is a paid mutator transaction binding the contract method 0xa4ece52c.
//
// Solidity: function pop() returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Session) Pop() (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.Pop(&_StorageCheckpointRegistryV2.TransactOpts)
}

// Pop is a paid mutator transaction binding the contract method 0xa4ece52c.
//
// Solidity: function pop() returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2TransactorSession) Pop() (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.Pop(&_StorageCheckpointRegistryV2.TransactOpts)
}

// Remove is a paid mutator transaction binding the contract method 0x29092d0e.
//
// Solidity: function remove(address cp) returns(bool found)
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Transactor) Remove(opts *bind.TransactOpts, cp common.Address) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.contract.Transact(opts, "remove", cp)
}

// Remove is a paid mutator transaction binding the contract method 0x29092d0e.
//
// Solidity: function remove(address cp) returns(bool found)
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Session) Remove(cp common.Address) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.Remove(&_StorageCheckpointRegistryV2.TransactOpts, cp)
}

// Remove is a paid mutator transaction binding the contract method 0x29092d0e.
//
// Solidity: function remove(address cp) returns(bool found)
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2TransactorSession) Remove(cp common.Address) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.Remove(&_StorageCheckpointRegistryV2.TransactOpts, cp)
}

// SetOwner is a paid mutator transaction binding the contract method 0x13af4035.
//
// Solidity: function setOwner(address _newOwner) returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Transactor) SetOwner(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.contract.Transact(opts, "setOwner", _newOwner)
}

// SetOwner is a paid mutator transaction binding the contract method 0x13af4035.
//
// Solidity: function setOwner(address _newOwner) returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2Session) SetOwner(_newOwner common.Address) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.SetOwner(&_StorageCheckpointRegistryV2.TransactOpts, _newOwner)
}

// SetOwner is a paid mutator transaction binding the contract method 0x13af4035.
//
// Solidity: function setOwner(address _newOwner) returns()
func (_StorageCheckpointRegistryV2 *StorageCheckpointRegistryV2TransactorSession) SetOwner(_newOwner common.Address) (*types.Transaction, error) {
	return _StorageCheckpointRegistryV2.Contract.SetOwner(&_StorageCheckpointRegistryV2.TransactOpts, _newOwner)
}
