github.com/codingfuture/orig-energi3@v0.8.4/energi/abi/ICheckpointV2.go (about)

     1  // Code generated - DO NOT EDIT.
     2  // This file is a generated binding and any manual changes will be lost.
     3  
     4  package abi
     5  
     6  import (
     7  	"math/big"
     8  	"strings"
     9  
    10  	ethereum "github.com/ethereum/go-ethereum"
    11  	"github.com/ethereum/go-ethereum/accounts/abi"
    12  	"github.com/ethereum/go-ethereum/accounts/abi/bind"
    13  	"github.com/ethereum/go-ethereum/common"
    14  	"github.com/ethereum/go-ethereum/core/types"
    15  	"github.com/ethereum/go-ethereum/event"
    16  )
    17  
    18  // Reference imports to suppress errors if they are not otherwise used.
    19  var (
    20  	_ = big.NewInt
    21  	_ = strings.NewReader
    22  	_ = ethereum.NotFound
    23  	_ = abi.U256
    24  	_ = bind.Bind
    25  	_ = common.Big1
    26  	_ = types.BloomLookup
    27  	_ = event.NewSubscription
    28  )
    29  
    30  // ICheckpointV2ABI is the input ABI used to generate the binding from.
    31  const ICheckpointV2ABI = "[{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"masternode\",\"type\":\"address\"}],\"name\":\"canVote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"info\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"since\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"sign\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"masternode\",\"type\":\"address\"}],\"name\":\"signature\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"signatureBase\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"sigbase\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"signatures\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"siglist\",\"type\":\"bytes[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]"
    32  
    33  // ICheckpointV2 is an auto generated Go binding around an Ethereum contract.
    34  type ICheckpointV2 struct {
    35  	ICheckpointV2Caller     // Read-only binding to the contract
    36  	ICheckpointV2Transactor // Write-only binding to the contract
    37  	ICheckpointV2Filterer   // Log filterer for contract events
    38  }
    39  
    40  // ICheckpointV2Caller is an auto generated read-only Go binding around an Ethereum contract.
    41  type ICheckpointV2Caller struct {
    42  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    43  }
    44  
    45  // ICheckpointV2Transactor is an auto generated write-only Go binding around an Ethereum contract.
    46  type ICheckpointV2Transactor struct {
    47  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    48  }
    49  
    50  // ICheckpointV2Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
    51  type ICheckpointV2Filterer struct {
    52  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    53  }
    54  
    55  // ICheckpointV2Session is an auto generated Go binding around an Ethereum contract,
    56  // with pre-set call and transact options.
    57  type ICheckpointV2Session struct {
    58  	Contract     *ICheckpointV2    // Generic contract binding to set the session for
    59  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    60  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    61  }
    62  
    63  // ICheckpointV2CallerSession is an auto generated read-only Go binding around an Ethereum contract,
    64  // with pre-set call options.
    65  type ICheckpointV2CallerSession struct {
    66  	Contract *ICheckpointV2Caller // Generic contract caller binding to set the session for
    67  	CallOpts bind.CallOpts        // Call options to use throughout this session
    68  }
    69  
    70  // ICheckpointV2TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    71  // with pre-set transact options.
    72  type ICheckpointV2TransactorSession struct {
    73  	Contract     *ICheckpointV2Transactor // Generic contract transactor binding to set the session for
    74  	TransactOpts bind.TransactOpts        // Transaction auth options to use throughout this session
    75  }
    76  
    77  // ICheckpointV2Raw is an auto generated low-level Go binding around an Ethereum contract.
    78  type ICheckpointV2Raw struct {
    79  	Contract *ICheckpointV2 // Generic contract binding to access the raw methods on
    80  }
    81  
    82  // ICheckpointV2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
    83  type ICheckpointV2CallerRaw struct {
    84  	Contract *ICheckpointV2Caller // Generic read-only contract binding to access the raw methods on
    85  }
    86  
    87  // ICheckpointV2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
    88  type ICheckpointV2TransactorRaw struct {
    89  	Contract *ICheckpointV2Transactor // Generic write-only contract binding to access the raw methods on
    90  }
    91  
    92  // NewICheckpointV2 creates a new instance of ICheckpointV2, bound to a specific deployed contract.
    93  func NewICheckpointV2(address common.Address, backend bind.ContractBackend) (*ICheckpointV2, error) {
    94  	contract, err := bindICheckpointV2(address, backend, backend, backend)
    95  	if err != nil {
    96  		return nil, err
    97  	}
    98  	return &ICheckpointV2{ICheckpointV2Caller: ICheckpointV2Caller{contract: contract}, ICheckpointV2Transactor: ICheckpointV2Transactor{contract: contract}, ICheckpointV2Filterer: ICheckpointV2Filterer{contract: contract}}, nil
    99  }
   100  
   101  // NewICheckpointV2Caller creates a new read-only instance of ICheckpointV2, bound to a specific deployed contract.
   102  func NewICheckpointV2Caller(address common.Address, caller bind.ContractCaller) (*ICheckpointV2Caller, error) {
   103  	contract, err := bindICheckpointV2(address, caller, nil, nil)
   104  	if err != nil {
   105  		return nil, err
   106  	}
   107  	return &ICheckpointV2Caller{contract: contract}, nil
   108  }
   109  
   110  // NewICheckpointV2Transactor creates a new write-only instance of ICheckpointV2, bound to a specific deployed contract.
   111  func NewICheckpointV2Transactor(address common.Address, transactor bind.ContractTransactor) (*ICheckpointV2Transactor, error) {
   112  	contract, err := bindICheckpointV2(address, nil, transactor, nil)
   113  	if err != nil {
   114  		return nil, err
   115  	}
   116  	return &ICheckpointV2Transactor{contract: contract}, nil
   117  }
   118  
   119  // NewICheckpointV2Filterer creates a new log filterer instance of ICheckpointV2, bound to a specific deployed contract.
   120  func NewICheckpointV2Filterer(address common.Address, filterer bind.ContractFilterer) (*ICheckpointV2Filterer, error) {
   121  	contract, err := bindICheckpointV2(address, nil, nil, filterer)
   122  	if err != nil {
   123  		return nil, err
   124  	}
   125  	return &ICheckpointV2Filterer{contract: contract}, nil
   126  }
   127  
   128  // bindICheckpointV2 binds a generic wrapper to an already deployed contract.
   129  func bindICheckpointV2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   130  	parsed, err := abi.JSON(strings.NewReader(ICheckpointV2ABI))
   131  	if err != nil {
   132  		return nil, err
   133  	}
   134  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   135  }
   136  
   137  // Call invokes the (constant) contract method with params as input values and
   138  // sets the output to result. The result type might be a single field for simple
   139  // returns, a slice of interfaces for anonymous returns and a struct for named
   140  // returns.
   141  func (_ICheckpointV2 *ICheckpointV2Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   142  	return _ICheckpointV2.Contract.ICheckpointV2Caller.contract.Call(opts, result, method, params...)
   143  }
   144  
   145  // Transfer initiates a plain transaction to move funds to the contract, calling
   146  // its default method if one is available.
   147  func (_ICheckpointV2 *ICheckpointV2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   148  	return _ICheckpointV2.Contract.ICheckpointV2Transactor.contract.Transfer(opts)
   149  }
   150  
   151  // Transact invokes the (paid) contract method with params as input values.
   152  func (_ICheckpointV2 *ICheckpointV2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   153  	return _ICheckpointV2.Contract.ICheckpointV2Transactor.contract.Transact(opts, method, params...)
   154  }
   155  
   156  // Call invokes the (constant) contract method with params as input values and
   157  // sets the output to result. The result type might be a single field for simple
   158  // returns, a slice of interfaces for anonymous returns and a struct for named
   159  // returns.
   160  func (_ICheckpointV2 *ICheckpointV2CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   161  	return _ICheckpointV2.Contract.contract.Call(opts, result, method, params...)
   162  }
   163  
   164  // Transfer initiates a plain transaction to move funds to the contract, calling
   165  // its default method if one is available.
   166  func (_ICheckpointV2 *ICheckpointV2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   167  	return _ICheckpointV2.Contract.contract.Transfer(opts)
   168  }
   169  
   170  // Transact invokes the (paid) contract method with params as input values.
   171  func (_ICheckpointV2 *ICheckpointV2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   172  	return _ICheckpointV2.Contract.contract.Transact(opts, method, params...)
   173  }
   174  
   175  // CanVote is a free data retrieval call binding the contract method 0xadfaa72e.
   176  //
   177  // Solidity: function canVote(address masternode) constant returns(bool)
   178  func (_ICheckpointV2 *ICheckpointV2Caller) CanVote(opts *bind.CallOpts, masternode common.Address) (bool, error) {
   179  	var (
   180  		ret0 = new(bool)
   181  	)
   182  	out := ret0
   183  	err := _ICheckpointV2.contract.Call(opts, out, "canVote", masternode)
   184  	return *ret0, err
   185  }
   186  
   187  // CanVote is a free data retrieval call binding the contract method 0xadfaa72e.
   188  //
   189  // Solidity: function canVote(address masternode) constant returns(bool)
   190  func (_ICheckpointV2 *ICheckpointV2Session) CanVote(masternode common.Address) (bool, error) {
   191  	return _ICheckpointV2.Contract.CanVote(&_ICheckpointV2.CallOpts, masternode)
   192  }
   193  
   194  // CanVote is a free data retrieval call binding the contract method 0xadfaa72e.
   195  //
   196  // Solidity: function canVote(address masternode) constant returns(bool)
   197  func (_ICheckpointV2 *ICheckpointV2CallerSession) CanVote(masternode common.Address) (bool, error) {
   198  	return _ICheckpointV2.Contract.CanVote(&_ICheckpointV2.CallOpts, masternode)
   199  }
   200  
   201  // Info is a free data retrieval call binding the contract method 0x370158ea.
   202  //
   203  // Solidity: function info() constant returns(uint256 number, bytes32 hash, uint256 since)
   204  func (_ICheckpointV2 *ICheckpointV2Caller) Info(opts *bind.CallOpts) (struct {
   205  	Number *big.Int
   206  	Hash   [32]byte
   207  	Since  *big.Int
   208  }, error) {
   209  	ret := new(struct {
   210  		Number *big.Int
   211  		Hash   [32]byte
   212  		Since  *big.Int
   213  	})
   214  	out := ret
   215  	err := _ICheckpointV2.contract.Call(opts, out, "info")
   216  	return *ret, err
   217  }
   218  
   219  // Info is a free data retrieval call binding the contract method 0x370158ea.
   220  //
   221  // Solidity: function info() constant returns(uint256 number, bytes32 hash, uint256 since)
   222  func (_ICheckpointV2 *ICheckpointV2Session) Info() (struct {
   223  	Number *big.Int
   224  	Hash   [32]byte
   225  	Since  *big.Int
   226  }, error) {
   227  	return _ICheckpointV2.Contract.Info(&_ICheckpointV2.CallOpts)
   228  }
   229  
   230  // Info is a free data retrieval call binding the contract method 0x370158ea.
   231  //
   232  // Solidity: function info() constant returns(uint256 number, bytes32 hash, uint256 since)
   233  func (_ICheckpointV2 *ICheckpointV2CallerSession) Info() (struct {
   234  	Number *big.Int
   235  	Hash   [32]byte
   236  	Since  *big.Int
   237  }, error) {
   238  	return _ICheckpointV2.Contract.Info(&_ICheckpointV2.CallOpts)
   239  }
   240  
   241  // Signature is a free data retrieval call binding the contract method 0x2bbe2c88.
   242  //
   243  // Solidity: function signature(address masternode) constant returns(bytes)
   244  func (_ICheckpointV2 *ICheckpointV2Caller) Signature(opts *bind.CallOpts, masternode common.Address) ([]byte, error) {
   245  	var (
   246  		ret0 = new([]byte)
   247  	)
   248  	out := ret0
   249  	err := _ICheckpointV2.contract.Call(opts, out, "signature", masternode)
   250  	return *ret0, err
   251  }
   252  
   253  // Signature is a free data retrieval call binding the contract method 0x2bbe2c88.
   254  //
   255  // Solidity: function signature(address masternode) constant returns(bytes)
   256  func (_ICheckpointV2 *ICheckpointV2Session) Signature(masternode common.Address) ([]byte, error) {
   257  	return _ICheckpointV2.Contract.Signature(&_ICheckpointV2.CallOpts, masternode)
   258  }
   259  
   260  // Signature is a free data retrieval call binding the contract method 0x2bbe2c88.
   261  //
   262  // Solidity: function signature(address masternode) constant returns(bytes)
   263  func (_ICheckpointV2 *ICheckpointV2CallerSession) Signature(masternode common.Address) ([]byte, error) {
   264  	return _ICheckpointV2.Contract.Signature(&_ICheckpointV2.CallOpts, masternode)
   265  }
   266  
   267  // SignatureBase is a free data retrieval call binding the contract method 0x124321c4.
   268  //
   269  // Solidity: function signatureBase() constant returns(bytes32 sigbase)
   270  func (_ICheckpointV2 *ICheckpointV2Caller) SignatureBase(opts *bind.CallOpts) ([32]byte, error) {
   271  	var (
   272  		ret0 = new([32]byte)
   273  	)
   274  	out := ret0
   275  	err := _ICheckpointV2.contract.Call(opts, out, "signatureBase")
   276  	return *ret0, err
   277  }
   278  
   279  // SignatureBase is a free data retrieval call binding the contract method 0x124321c4.
   280  //
   281  // Solidity: function signatureBase() constant returns(bytes32 sigbase)
   282  func (_ICheckpointV2 *ICheckpointV2Session) SignatureBase() ([32]byte, error) {
   283  	return _ICheckpointV2.Contract.SignatureBase(&_ICheckpointV2.CallOpts)
   284  }
   285  
   286  // SignatureBase is a free data retrieval call binding the contract method 0x124321c4.
   287  //
   288  // Solidity: function signatureBase() constant returns(bytes32 sigbase)
   289  func (_ICheckpointV2 *ICheckpointV2CallerSession) SignatureBase() ([32]byte, error) {
   290  	return _ICheckpointV2.Contract.SignatureBase(&_ICheckpointV2.CallOpts)
   291  }
   292  
   293  // Signatures is a free data retrieval call binding the contract method 0xf27959c7.
   294  //
   295  // Solidity: function signatures() constant returns(bytes[] siglist)
   296  func (_ICheckpointV2 *ICheckpointV2Caller) Signatures(opts *bind.CallOpts) ([][]byte, error) {
   297  	var (
   298  		ret0 = new([][]byte)
   299  	)
   300  	out := ret0
   301  	err := _ICheckpointV2.contract.Call(opts, out, "signatures")
   302  	return *ret0, err
   303  }
   304  
   305  // Signatures is a free data retrieval call binding the contract method 0xf27959c7.
   306  //
   307  // Solidity: function signatures() constant returns(bytes[] siglist)
   308  func (_ICheckpointV2 *ICheckpointV2Session) Signatures() ([][]byte, error) {
   309  	return _ICheckpointV2.Contract.Signatures(&_ICheckpointV2.CallOpts)
   310  }
   311  
   312  // Signatures is a free data retrieval call binding the contract method 0xf27959c7.
   313  //
   314  // Solidity: function signatures() constant returns(bytes[] siglist)
   315  func (_ICheckpointV2 *ICheckpointV2CallerSession) Signatures() ([][]byte, error) {
   316  	return _ICheckpointV2.Contract.Signatures(&_ICheckpointV2.CallOpts)
   317  }
   318  
   319  // Sign is a paid mutator transaction binding the contract method 0x76cd7cbc.
   320  //
   321  // Solidity: function sign(bytes signature) returns()
   322  func (_ICheckpointV2 *ICheckpointV2Transactor) Sign(opts *bind.TransactOpts, signature []byte) (*types.Transaction, error) {
   323  	return _ICheckpointV2.contract.Transact(opts, "sign", signature)
   324  }
   325  
   326  // Sign is a paid mutator transaction binding the contract method 0x76cd7cbc.
   327  //
   328  // Solidity: function sign(bytes signature) returns()
   329  func (_ICheckpointV2 *ICheckpointV2Session) Sign(signature []byte) (*types.Transaction, error) {
   330  	return _ICheckpointV2.Contract.Sign(&_ICheckpointV2.TransactOpts, signature)
   331  }
   332  
   333  // Sign is a paid mutator transaction binding the contract method 0x76cd7cbc.
   334  //
   335  // Solidity: function sign(bytes signature) returns()
   336  func (_ICheckpointV2 *ICheckpointV2TransactorSession) Sign(signature []byte) (*types.Transaction, error) {
   337  	return _ICheckpointV2.Contract.Sign(&_ICheckpointV2.TransactOpts, signature)
   338  }