github.com/SmartMeshFoundation/Spectrum@v0.0.0-20220621030607-452a266fee1e/contracts/chequebook/contract/chequebook.go (about)

     1  // This file is an automatically generated Go binding. Do not modify as any
     2  // change will likely be lost upon the next re-generation!
     3  
     4  package contract
     5  
     6  import (
     7  	"math/big"
     8  	"strings"
     9  
    10  	"github.com/SmartMeshFoundation/Spectrum/accounts/abi"
    11  	"github.com/SmartMeshFoundation/Spectrum/accounts/abi/bind"
    12  	"github.com/SmartMeshFoundation/Spectrum/common"
    13  	"github.com/SmartMeshFoundation/Spectrum/core/types"
    14  )
    15  
    16  // ChequebookABI is the input ABI used to generate the binding from.
    17  const ChequebookABI = `[{"constant":false,"inputs":[],"name":"kill","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"sent","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"},{"name":"amount","type":"uint256"},{"name":"sig_v","type":"uint8"},{"name":"sig_r","type":"bytes32"},{"name":"sig_s","type":"bytes32"}],"name":"cash","outputs":[],"type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"deadbeat","type":"address"}],"name":"Overdraft","type":"event"}]`
    18  
    19  // ChequebookBin is the compiled bytecode used for deploying new contracts.
    20  const ChequebookBin = `0x606060405260008054600160a060020a031916331790556101ff806100246000396000f3606060405260e060020a600035046341c0e1b581146100315780637bf786f814610059578063fbf788d614610071575b005b61002f60005433600160a060020a03908116911614156100bd57600054600160a060020a0316ff5b6100ab60043560016020526000908152604090205481565b61002f600435602435604435606435608435600160a060020a03851660009081526001602052604081205485116100bf575b505050505050565b60408051918252519081900360200190f35b565b50604080516c0100000000000000000000000030600160a060020a0390811682028352881602601482015260288101869052815190819003604801812080825260ff861660208381019190915282840186905260608301859052925190926001926080818101939182900301816000866161da5a03f11561000257505060405151600054600160a060020a0390811691161461015a576100a3565b600160a060020a038681166000908152600160205260409020543090911631908603106101b357604060008181208790559051600160a060020a0388169190819081818181818881f1935050505015156100a357610002565b60005460408051600160a060020a03929092168252517f2250e2993c15843b32621c89447cc589ee7a9f049c026986e545d3c2c0c6f9789181900360200190a185600160a060020a0316ff`
    21  
    22  // DeployChequebook deploys a new Ethereum contract, binding an instance of Chequebook to it.
    23  func DeployChequebook(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Chequebook, error) {
    24  	parsed, err := abi.JSON(strings.NewReader(ChequebookABI))
    25  	if err != nil {
    26  		return common.Address{}, nil, nil, err
    27  	}
    28  	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ChequebookBin), backend)
    29  	if err != nil {
    30  		return common.Address{}, nil, nil, err
    31  	}
    32  	return address, tx, &Chequebook{ChequebookCaller: ChequebookCaller{contract: contract}, ChequebookTransactor: ChequebookTransactor{contract: contract}}, nil
    33  }
    34  
    35  // Chequebook is an auto generated Go binding around an Ethereum contract.
    36  type Chequebook struct {
    37  	ChequebookCaller     // Read-only binding to the contract
    38  	ChequebookTransactor // Write-only binding to the contract
    39  }
    40  
    41  // ChequebookCaller is an auto generated read-only Go binding around an Ethereum contract.
    42  type ChequebookCaller struct {
    43  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    44  }
    45  
    46  // ChequebookTransactor is an auto generated write-only Go binding around an Ethereum contract.
    47  type ChequebookTransactor struct {
    48  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    49  }
    50  
    51  // ChequebookSession is an auto generated Go binding around an Ethereum contract,
    52  // with pre-set call and transact options.
    53  type ChequebookSession struct {
    54  	Contract     *Chequebook       // Generic contract binding to set the session for
    55  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    56  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    57  }
    58  
    59  // ChequebookCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    60  // with pre-set call options.
    61  type ChequebookCallerSession struct {
    62  	Contract *ChequebookCaller // Generic contract caller binding to set the session for
    63  	CallOpts bind.CallOpts     // Call options to use throughout this session
    64  }
    65  
    66  // ChequebookTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    67  // with pre-set transact options.
    68  type ChequebookTransactorSession struct {
    69  	Contract     *ChequebookTransactor // Generic contract transactor binding to set the session for
    70  	TransactOpts bind.TransactOpts     // Transaction auth options to use throughout this session
    71  }
    72  
    73  // ChequebookRaw is an auto generated low-level Go binding around an Ethereum contract.
    74  type ChequebookRaw struct {
    75  	Contract *Chequebook // Generic contract binding to access the raw methods on
    76  }
    77  
    78  // ChequebookCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
    79  type ChequebookCallerRaw struct {
    80  	Contract *ChequebookCaller // Generic read-only contract binding to access the raw methods on
    81  }
    82  
    83  // ChequebookTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
    84  type ChequebookTransactorRaw struct {
    85  	Contract *ChequebookTransactor // Generic write-only contract binding to access the raw methods on
    86  }
    87  
    88  // NewChequebook creates a new instance of Chequebook, bound to a specific deployed contract.
    89  func NewChequebook(address common.Address, backend bind.ContractBackend) (*Chequebook, error) {
    90  	contract, err := bindChequebook(address, backend, backend)
    91  	if err != nil {
    92  		return nil, err
    93  	}
    94  	return &Chequebook{ChequebookCaller: ChequebookCaller{contract: contract}, ChequebookTransactor: ChequebookTransactor{contract: contract}}, nil
    95  }
    96  
    97  // NewChequebookCaller creates a new read-only instance of Chequebook, bound to a specific deployed contract.
    98  func NewChequebookCaller(address common.Address, caller bind.ContractCaller) (*ChequebookCaller, error) {
    99  	contract, err := bindChequebook(address, caller, nil)
   100  	if err != nil {
   101  		return nil, err
   102  	}
   103  	return &ChequebookCaller{contract: contract}, nil
   104  }
   105  
   106  // NewChequebookTransactor creates a new write-only instance of Chequebook, bound to a specific deployed contract.
   107  func NewChequebookTransactor(address common.Address, transactor bind.ContractTransactor) (*ChequebookTransactor, error) {
   108  	contract, err := bindChequebook(address, nil, transactor)
   109  	if err != nil {
   110  		return nil, err
   111  	}
   112  	return &ChequebookTransactor{contract: contract}, nil
   113  }
   114  
   115  // bindChequebook binds a generic wrapper to an already deployed contract.
   116  func bindChequebook(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor) (*bind.BoundContract, error) {
   117  	parsed, err := abi.JSON(strings.NewReader(ChequebookABI))
   118  	if err != nil {
   119  		return nil, err
   120  	}
   121  	return bind.NewBoundContract(address, parsed, caller, transactor), nil
   122  }
   123  
   124  // Call invokes the (constant) contract method with params as input values and
   125  // sets the output to result. The result type might be a single field for simple
   126  // returns, a slice of interfaces for anonymous returns and a struct for named
   127  // returns.
   128  func (_Chequebook *ChequebookRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   129  	return _Chequebook.Contract.ChequebookCaller.contract.Call(opts, result, method, params...)
   130  }
   131  
   132  // Transfer initiates a plain transaction to move funds to the contract, calling
   133  // its default method if one is available.
   134  func (_Chequebook *ChequebookRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   135  	return _Chequebook.Contract.ChequebookTransactor.contract.Transfer(opts)
   136  }
   137  
   138  // Transact invokes the (paid) contract method with params as input values.
   139  func (_Chequebook *ChequebookRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   140  	return _Chequebook.Contract.ChequebookTransactor.contract.Transact(opts, method, params...)
   141  }
   142  
   143  // Call invokes the (constant) contract method with params as input values and
   144  // sets the output to result. The result type might be a single field for simple
   145  // returns, a slice of interfaces for anonymous returns and a struct for named
   146  // returns.
   147  func (_Chequebook *ChequebookCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   148  	return _Chequebook.Contract.contract.Call(opts, result, method, params...)
   149  }
   150  
   151  // Transfer initiates a plain transaction to move funds to the contract, calling
   152  // its default method if one is available.
   153  func (_Chequebook *ChequebookTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   154  	return _Chequebook.Contract.contract.Transfer(opts)
   155  }
   156  
   157  // Transact invokes the (paid) contract method with params as input values.
   158  func (_Chequebook *ChequebookTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   159  	return _Chequebook.Contract.contract.Transact(opts, method, params...)
   160  }
   161  
   162  // Sent is a free data retrieval call binding the contract method 0x7bf786f8.
   163  //
   164  // Solidity: function sent( address) constant returns(uint256)
   165  func (_Chequebook *ChequebookCaller) Sent(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) {
   166  	var (
   167  		ret0 = new(*big.Int)
   168  	)
   169  	out := ret0
   170  	err := _Chequebook.contract.Call(opts, out, "sent", arg0)
   171  	return *ret0, err
   172  }
   173  
   174  // Sent is a free data retrieval call binding the contract method 0x7bf786f8.
   175  //
   176  // Solidity: function sent( address) constant returns(uint256)
   177  func (_Chequebook *ChequebookSession) Sent(arg0 common.Address) (*big.Int, error) {
   178  	return _Chequebook.Contract.Sent(&_Chequebook.CallOpts, arg0)
   179  }
   180  
   181  // Sent is a free data retrieval call binding the contract method 0x7bf786f8.
   182  //
   183  // Solidity: function sent( address) constant returns(uint256)
   184  func (_Chequebook *ChequebookCallerSession) Sent(arg0 common.Address) (*big.Int, error) {
   185  	return _Chequebook.Contract.Sent(&_Chequebook.CallOpts, arg0)
   186  }
   187  
   188  // Cash is a paid mutator transaction binding the contract method 0xfbf788d6.
   189  //
   190  // Solidity: function cash(beneficiary address, amount uint256, sig_v uint8, sig_r bytes32, sig_s bytes32) returns()
   191  func (_Chequebook *ChequebookTransactor) Cash(opts *bind.TransactOpts, beneficiary common.Address, amount *big.Int, sig_v uint8, sig_r [32]byte, sig_s [32]byte) (*types.Transaction, error) {
   192  	return _Chequebook.contract.Transact(opts, "cash", beneficiary, amount, sig_v, sig_r, sig_s)
   193  }
   194  
   195  // Cash is a paid mutator transaction binding the contract method 0xfbf788d6.
   196  //
   197  // Solidity: function cash(beneficiary address, amount uint256, sig_v uint8, sig_r bytes32, sig_s bytes32) returns()
   198  func (_Chequebook *ChequebookSession) Cash(beneficiary common.Address, amount *big.Int, sig_v uint8, sig_r [32]byte, sig_s [32]byte) (*types.Transaction, error) {
   199  	return _Chequebook.Contract.Cash(&_Chequebook.TransactOpts, beneficiary, amount, sig_v, sig_r, sig_s)
   200  }
   201  
   202  // Cash is a paid mutator transaction binding the contract method 0xfbf788d6.
   203  //
   204  // Solidity: function cash(beneficiary address, amount uint256, sig_v uint8, sig_r bytes32, sig_s bytes32) returns()
   205  func (_Chequebook *ChequebookTransactorSession) Cash(beneficiary common.Address, amount *big.Int, sig_v uint8, sig_r [32]byte, sig_s [32]byte) (*types.Transaction, error) {
   206  	return _Chequebook.Contract.Cash(&_Chequebook.TransactOpts, beneficiary, amount, sig_v, sig_r, sig_s)
   207  }
   208  
   209  // Kill is a paid mutator transaction binding the contract method 0x41c0e1b5.
   210  //
   211  // Solidity: function kill() returns()
   212  func (_Chequebook *ChequebookTransactor) Kill(opts *bind.TransactOpts) (*types.Transaction, error) {
   213  	return _Chequebook.contract.Transact(opts, "kill")
   214  }
   215  
   216  // Kill is a paid mutator transaction binding the contract method 0x41c0e1b5.
   217  //
   218  // Solidity: function kill() returns()
   219  func (_Chequebook *ChequebookSession) Kill() (*types.Transaction, error) {
   220  	return _Chequebook.Contract.Kill(&_Chequebook.TransactOpts)
   221  }
   222  
   223  // Kill is a paid mutator transaction binding the contract method 0x41c0e1b5.
   224  //
   225  // Solidity: function kill() returns()
   226  func (_Chequebook *ChequebookTransactorSession) Kill() (*types.Transaction, error) {
   227  	return _Chequebook.Contract.Kill(&_Chequebook.TransactOpts)
   228  }
   229  
   230  // MortalABI is the input ABI used to generate the binding from.
   231  const MortalABI = `[{"constant":false,"inputs":[],"name":"kill","outputs":[],"type":"function"}]`
   232  
   233  // MortalBin is the compiled bytecode used for deploying new contracts.
   234  const MortalBin = `0x606060405260008054600160a060020a03191633179055605c8060226000396000f3606060405260e060020a600035046341c0e1b58114601a575b005b60186000543373ffffffffffffffffffffffffffffffffffffffff90811691161415605a5760005473ffffffffffffffffffffffffffffffffffffffff16ff5b56`
   235  
   236  // DeployMortal deploys a new Ethereum contract, binding an instance of Mortal to it.
   237  func DeployMortal(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Mortal, error) {
   238  	parsed, err := abi.JSON(strings.NewReader(MortalABI))
   239  	if err != nil {
   240  		return common.Address{}, nil, nil, err
   241  	}
   242  	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(MortalBin), backend)
   243  	if err != nil {
   244  		return common.Address{}, nil, nil, err
   245  	}
   246  	return address, tx, &Mortal{MortalCaller: MortalCaller{contract: contract}, MortalTransactor: MortalTransactor{contract: contract}}, nil
   247  }
   248  
   249  // Mortal is an auto generated Go binding around an Ethereum contract.
   250  type Mortal struct {
   251  	MortalCaller     // Read-only binding to the contract
   252  	MortalTransactor // Write-only binding to the contract
   253  }
   254  
   255  // MortalCaller is an auto generated read-only Go binding around an Ethereum contract.
   256  type MortalCaller struct {
   257  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
   258  }
   259  
   260  // MortalTransactor is an auto generated write-only Go binding around an Ethereum contract.
   261  type MortalTransactor struct {
   262  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
   263  }
   264  
   265  // MortalSession is an auto generated Go binding around an Ethereum contract,
   266  // with pre-set call and transact options.
   267  type MortalSession struct {
   268  	Contract     *Mortal           // Generic contract binding to set the session for
   269  	CallOpts     bind.CallOpts     // Call options to use throughout this session
   270  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
   271  }
   272  
   273  // MortalCallerSession is an auto generated read-only Go binding around an Ethereum contract,
   274  // with pre-set call options.
   275  type MortalCallerSession struct {
   276  	Contract *MortalCaller // Generic contract caller binding to set the session for
   277  	CallOpts bind.CallOpts // Call options to use throughout this session
   278  }
   279  
   280  // MortalTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
   281  // with pre-set transact options.
   282  type MortalTransactorSession struct {
   283  	Contract     *MortalTransactor // Generic contract transactor binding to set the session for
   284  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
   285  }
   286  
   287  // MortalRaw is an auto generated low-level Go binding around an Ethereum contract.
   288  type MortalRaw struct {
   289  	Contract *Mortal // Generic contract binding to access the raw methods on
   290  }
   291  
   292  // MortalCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   293  type MortalCallerRaw struct {
   294  	Contract *MortalCaller // Generic read-only contract binding to access the raw methods on
   295  }
   296  
   297  // MortalTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   298  type MortalTransactorRaw struct {
   299  	Contract *MortalTransactor // Generic write-only contract binding to access the raw methods on
   300  }
   301  
   302  // NewMortal creates a new instance of Mortal, bound to a specific deployed contract.
   303  func NewMortal(address common.Address, backend bind.ContractBackend) (*Mortal, error) {
   304  	contract, err := bindMortal(address, backend, backend)
   305  	if err != nil {
   306  		return nil, err
   307  	}
   308  	return &Mortal{MortalCaller: MortalCaller{contract: contract}, MortalTransactor: MortalTransactor{contract: contract}}, nil
   309  }
   310  
   311  // NewMortalCaller creates a new read-only instance of Mortal, bound to a specific deployed contract.
   312  func NewMortalCaller(address common.Address, caller bind.ContractCaller) (*MortalCaller, error) {
   313  	contract, err := bindMortal(address, caller, nil)
   314  	if err != nil {
   315  		return nil, err
   316  	}
   317  	return &MortalCaller{contract: contract}, nil
   318  }
   319  
   320  // NewMortalTransactor creates a new write-only instance of Mortal, bound to a specific deployed contract.
   321  func NewMortalTransactor(address common.Address, transactor bind.ContractTransactor) (*MortalTransactor, error) {
   322  	contract, err := bindMortal(address, nil, transactor)
   323  	if err != nil {
   324  		return nil, err
   325  	}
   326  	return &MortalTransactor{contract: contract}, nil
   327  }
   328  
   329  // bindMortal binds a generic wrapper to an already deployed contract.
   330  func bindMortal(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor) (*bind.BoundContract, error) {
   331  	parsed, err := abi.JSON(strings.NewReader(MortalABI))
   332  	if err != nil {
   333  		return nil, err
   334  	}
   335  	return bind.NewBoundContract(address, parsed, caller, transactor), nil
   336  }
   337  
   338  // Call invokes the (constant) contract method with params as input values and
   339  // sets the output to result. The result type might be a single field for simple
   340  // returns, a slice of interfaces for anonymous returns and a struct for named
   341  // returns.
   342  func (_Mortal *MortalRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   343  	return _Mortal.Contract.MortalCaller.contract.Call(opts, result, method, params...)
   344  }
   345  
   346  // Transfer initiates a plain transaction to move funds to the contract, calling
   347  // its default method if one is available.
   348  func (_Mortal *MortalRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   349  	return _Mortal.Contract.MortalTransactor.contract.Transfer(opts)
   350  }
   351  
   352  // Transact invokes the (paid) contract method with params as input values.
   353  func (_Mortal *MortalRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   354  	return _Mortal.Contract.MortalTransactor.contract.Transact(opts, method, params...)
   355  }
   356  
   357  // Call invokes the (constant) contract method with params as input values and
   358  // sets the output to result. The result type might be a single field for simple
   359  // returns, a slice of interfaces for anonymous returns and a struct for named
   360  // returns.
   361  func (_Mortal *MortalCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   362  	return _Mortal.Contract.contract.Call(opts, result, method, params...)
   363  }
   364  
   365  // Transfer initiates a plain transaction to move funds to the contract, calling
   366  // its default method if one is available.
   367  func (_Mortal *MortalTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   368  	return _Mortal.Contract.contract.Transfer(opts)
   369  }
   370  
   371  // Transact invokes the (paid) contract method with params as input values.
   372  func (_Mortal *MortalTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   373  	return _Mortal.Contract.contract.Transact(opts, method, params...)
   374  }
   375  
   376  // Kill is a paid mutator transaction binding the contract method 0x41c0e1b5.
   377  //
   378  // Solidity: function kill() returns()
   379  func (_Mortal *MortalTransactor) Kill(opts *bind.TransactOpts) (*types.Transaction, error) {
   380  	return _Mortal.contract.Transact(opts, "kill")
   381  }
   382  
   383  // Kill is a paid mutator transaction binding the contract method 0x41c0e1b5.
   384  //
   385  // Solidity: function kill() returns()
   386  func (_Mortal *MortalSession) Kill() (*types.Transaction, error) {
   387  	return _Mortal.Contract.Kill(&_Mortal.TransactOpts)
   388  }
   389  
   390  // Kill is a paid mutator transaction binding the contract method 0x41c0e1b5.
   391  //
   392  // Solidity: function kill() returns()
   393  func (_Mortal *MortalTransactorSession) Kill() (*types.Transaction, error) {
   394  	return _Mortal.Contract.Kill(&_Mortal.TransactOpts)
   395  }
   396  
   397  // OwnedABI is the input ABI used to generate the binding from.
   398  const OwnedABI = `[{"inputs":[],"type":"constructor"}]`
   399  
   400  // OwnedBin is the compiled bytecode used for deploying new contracts.
   401  const OwnedBin = `0x606060405260008054600160a060020a0319163317905560068060226000396000f3606060405200`
   402  
   403  // DeployOwned deploys a new Ethereum contract, binding an instance of Owned to it.
   404  func DeployOwned(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Owned, error) {
   405  	parsed, err := abi.JSON(strings.NewReader(OwnedABI))
   406  	if err != nil {
   407  		return common.Address{}, nil, nil, err
   408  	}
   409  	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(OwnedBin), backend)
   410  	if err != nil {
   411  		return common.Address{}, nil, nil, err
   412  	}
   413  	return address, tx, &Owned{OwnedCaller: OwnedCaller{contract: contract}, OwnedTransactor: OwnedTransactor{contract: contract}}, nil
   414  }
   415  
   416  // Owned is an auto generated Go binding around an Ethereum contract.
   417  type Owned struct {
   418  	OwnedCaller     // Read-only binding to the contract
   419  	OwnedTransactor // Write-only binding to the contract
   420  }
   421  
   422  // OwnedCaller is an auto generated read-only Go binding around an Ethereum contract.
   423  type OwnedCaller struct {
   424  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
   425  }
   426  
   427  // OwnedTransactor is an auto generated write-only Go binding around an Ethereum contract.
   428  type OwnedTransactor struct {
   429  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
   430  }
   431  
   432  // OwnedSession is an auto generated Go binding around an Ethereum contract,
   433  // with pre-set call and transact options.
   434  type OwnedSession struct {
   435  	Contract     *Owned            // Generic contract binding to set the session for
   436  	CallOpts     bind.CallOpts     // Call options to use throughout this session
   437  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
   438  }
   439  
   440  // OwnedCallerSession is an auto generated read-only Go binding around an Ethereum contract,
   441  // with pre-set call options.
   442  type OwnedCallerSession struct {
   443  	Contract *OwnedCaller  // Generic contract caller binding to set the session for
   444  	CallOpts bind.CallOpts // Call options to use throughout this session
   445  }
   446  
   447  // OwnedTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
   448  // with pre-set transact options.
   449  type OwnedTransactorSession struct {
   450  	Contract     *OwnedTransactor  // Generic contract transactor binding to set the session for
   451  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
   452  }
   453  
   454  // OwnedRaw is an auto generated low-level Go binding around an Ethereum contract.
   455  type OwnedRaw struct {
   456  	Contract *Owned // Generic contract binding to access the raw methods on
   457  }
   458  
   459  // OwnedCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   460  type OwnedCallerRaw struct {
   461  	Contract *OwnedCaller // Generic read-only contract binding to access the raw methods on
   462  }
   463  
   464  // OwnedTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   465  type OwnedTransactorRaw struct {
   466  	Contract *OwnedTransactor // Generic write-only contract binding to access the raw methods on
   467  }
   468  
   469  // NewOwned creates a new instance of Owned, bound to a specific deployed contract.
   470  func NewOwned(address common.Address, backend bind.ContractBackend) (*Owned, error) {
   471  	contract, err := bindOwned(address, backend, backend)
   472  	if err != nil {
   473  		return nil, err
   474  	}
   475  	return &Owned{OwnedCaller: OwnedCaller{contract: contract}, OwnedTransactor: OwnedTransactor{contract: contract}}, nil
   476  }
   477  
   478  // NewOwnedCaller creates a new read-only instance of Owned, bound to a specific deployed contract.
   479  func NewOwnedCaller(address common.Address, caller bind.ContractCaller) (*OwnedCaller, error) {
   480  	contract, err := bindOwned(address, caller, nil)
   481  	if err != nil {
   482  		return nil, err
   483  	}
   484  	return &OwnedCaller{contract: contract}, nil
   485  }
   486  
   487  // NewOwnedTransactor creates a new write-only instance of Owned, bound to a specific deployed contract.
   488  func NewOwnedTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnedTransactor, error) {
   489  	contract, err := bindOwned(address, nil, transactor)
   490  	if err != nil {
   491  		return nil, err
   492  	}
   493  	return &OwnedTransactor{contract: contract}, nil
   494  }
   495  
   496  // bindOwned binds a generic wrapper to an already deployed contract.
   497  func bindOwned(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor) (*bind.BoundContract, error) {
   498  	parsed, err := abi.JSON(strings.NewReader(OwnedABI))
   499  	if err != nil {
   500  		return nil, err
   501  	}
   502  	return bind.NewBoundContract(address, parsed, caller, transactor), nil
   503  }
   504  
   505  // Call invokes the (constant) contract method with params as input values and
   506  // sets the output to result. The result type might be a single field for simple
   507  // returns, a slice of interfaces for anonymous returns and a struct for named
   508  // returns.
   509  func (_Owned *OwnedRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   510  	return _Owned.Contract.OwnedCaller.contract.Call(opts, result, method, params...)
   511  }
   512  
   513  // Transfer initiates a plain transaction to move funds to the contract, calling
   514  // its default method if one is available.
   515  func (_Owned *OwnedRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   516  	return _Owned.Contract.OwnedTransactor.contract.Transfer(opts)
   517  }
   518  
   519  // Transact invokes the (paid) contract method with params as input values.
   520  func (_Owned *OwnedRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   521  	return _Owned.Contract.OwnedTransactor.contract.Transact(opts, method, params...)
   522  }
   523  
   524  // Call invokes the (constant) contract method with params as input values and
   525  // sets the output to result. The result type might be a single field for simple
   526  // returns, a slice of interfaces for anonymous returns and a struct for named
   527  // returns.
   528  func (_Owned *OwnedCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   529  	return _Owned.Contract.contract.Call(opts, result, method, params...)
   530  }
   531  
   532  // Transfer initiates a plain transaction to move funds to the contract, calling
   533  // its default method if one is available.
   534  func (_Owned *OwnedTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   535  	return _Owned.Contract.contract.Transfer(opts)
   536  }
   537  
   538  // Transact invokes the (paid) contract method with params as input values.
   539  func (_Owned *OwnedTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   540  	return _Owned.Contract.contract.Transact(opts, method, params...)
   541  }