github.com/codingfuture/orig-energi3@v0.8.4/energi/abi/IBlockReward.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  // IBlockRewardABI is the input ABI used to generate the binding from.
    31  const IBlockRewardABI = "[{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"getReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"reward\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"}]"
    32  
    33  // IBlockReward is an auto generated Go binding around an Ethereum contract.
    34  type IBlockReward struct {
    35  	IBlockRewardCaller     // Read-only binding to the contract
    36  	IBlockRewardTransactor // Write-only binding to the contract
    37  	IBlockRewardFilterer   // Log filterer for contract events
    38  }
    39  
    40  // IBlockRewardCaller is an auto generated read-only Go binding around an Ethereum contract.
    41  type IBlockRewardCaller struct {
    42  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    43  }
    44  
    45  // IBlockRewardTransactor is an auto generated write-only Go binding around an Ethereum contract.
    46  type IBlockRewardTransactor struct {
    47  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    48  }
    49  
    50  // IBlockRewardFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    51  type IBlockRewardFilterer struct {
    52  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    53  }
    54  
    55  // IBlockRewardSession is an auto generated Go binding around an Ethereum contract,
    56  // with pre-set call and transact options.
    57  type IBlockRewardSession struct {
    58  	Contract     *IBlockReward     // 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  // IBlockRewardCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    64  // with pre-set call options.
    65  type IBlockRewardCallerSession struct {
    66  	Contract *IBlockRewardCaller // Generic contract caller binding to set the session for
    67  	CallOpts bind.CallOpts       // Call options to use throughout this session
    68  }
    69  
    70  // IBlockRewardTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    71  // with pre-set transact options.
    72  type IBlockRewardTransactorSession struct {
    73  	Contract     *IBlockRewardTransactor // Generic contract transactor binding to set the session for
    74  	TransactOpts bind.TransactOpts       // Transaction auth options to use throughout this session
    75  }
    76  
    77  // IBlockRewardRaw is an auto generated low-level Go binding around an Ethereum contract.
    78  type IBlockRewardRaw struct {
    79  	Contract *IBlockReward // Generic contract binding to access the raw methods on
    80  }
    81  
    82  // IBlockRewardCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
    83  type IBlockRewardCallerRaw struct {
    84  	Contract *IBlockRewardCaller // Generic read-only contract binding to access the raw methods on
    85  }
    86  
    87  // IBlockRewardTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
    88  type IBlockRewardTransactorRaw struct {
    89  	Contract *IBlockRewardTransactor // Generic write-only contract binding to access the raw methods on
    90  }
    91  
    92  // NewIBlockReward creates a new instance of IBlockReward, bound to a specific deployed contract.
    93  func NewIBlockReward(address common.Address, backend bind.ContractBackend) (*IBlockReward, error) {
    94  	contract, err := bindIBlockReward(address, backend, backend, backend)
    95  	if err != nil {
    96  		return nil, err
    97  	}
    98  	return &IBlockReward{IBlockRewardCaller: IBlockRewardCaller{contract: contract}, IBlockRewardTransactor: IBlockRewardTransactor{contract: contract}, IBlockRewardFilterer: IBlockRewardFilterer{contract: contract}}, nil
    99  }
   100  
   101  // NewIBlockRewardCaller creates a new read-only instance of IBlockReward, bound to a specific deployed contract.
   102  func NewIBlockRewardCaller(address common.Address, caller bind.ContractCaller) (*IBlockRewardCaller, error) {
   103  	contract, err := bindIBlockReward(address, caller, nil, nil)
   104  	if err != nil {
   105  		return nil, err
   106  	}
   107  	return &IBlockRewardCaller{contract: contract}, nil
   108  }
   109  
   110  // NewIBlockRewardTransactor creates a new write-only instance of IBlockReward, bound to a specific deployed contract.
   111  func NewIBlockRewardTransactor(address common.Address, transactor bind.ContractTransactor) (*IBlockRewardTransactor, error) {
   112  	contract, err := bindIBlockReward(address, nil, transactor, nil)
   113  	if err != nil {
   114  		return nil, err
   115  	}
   116  	return &IBlockRewardTransactor{contract: contract}, nil
   117  }
   118  
   119  // NewIBlockRewardFilterer creates a new log filterer instance of IBlockReward, bound to a specific deployed contract.
   120  func NewIBlockRewardFilterer(address common.Address, filterer bind.ContractFilterer) (*IBlockRewardFilterer, error) {
   121  	contract, err := bindIBlockReward(address, nil, nil, filterer)
   122  	if err != nil {
   123  		return nil, err
   124  	}
   125  	return &IBlockRewardFilterer{contract: contract}, nil
   126  }
   127  
   128  // bindIBlockReward binds a generic wrapper to an already deployed contract.
   129  func bindIBlockReward(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   130  	parsed, err := abi.JSON(strings.NewReader(IBlockRewardABI))
   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 (_IBlockReward *IBlockRewardRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   142  	return _IBlockReward.Contract.IBlockRewardCaller.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 (_IBlockReward *IBlockRewardRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   148  	return _IBlockReward.Contract.IBlockRewardTransactor.contract.Transfer(opts)
   149  }
   150  
   151  // Transact invokes the (paid) contract method with params as input values.
   152  func (_IBlockReward *IBlockRewardRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   153  	return _IBlockReward.Contract.IBlockRewardTransactor.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 (_IBlockReward *IBlockRewardCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   161  	return _IBlockReward.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 (_IBlockReward *IBlockRewardTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   167  	return _IBlockReward.Contract.contract.Transfer(opts)
   168  }
   169  
   170  // Transact invokes the (paid) contract method with params as input values.
   171  func (_IBlockReward *IBlockRewardTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   172  	return _IBlockReward.Contract.contract.Transact(opts, method, params...)
   173  }
   174  
   175  // GetReward is a free data retrieval call binding the contract method 0x1c4b774b.
   176  //
   177  // Solidity: function getReward(uint256 _blockNumber) constant returns(uint256 amount)
   178  func (_IBlockReward *IBlockRewardCaller) GetReward(opts *bind.CallOpts, _blockNumber *big.Int) (*big.Int, error) {
   179  	var (
   180  		ret0 = new(*big.Int)
   181  	)
   182  	out := ret0
   183  	err := _IBlockReward.contract.Call(opts, out, "getReward", _blockNumber)
   184  	return *ret0, err
   185  }
   186  
   187  // GetReward is a free data retrieval call binding the contract method 0x1c4b774b.
   188  //
   189  // Solidity: function getReward(uint256 _blockNumber) constant returns(uint256 amount)
   190  func (_IBlockReward *IBlockRewardSession) GetReward(_blockNumber *big.Int) (*big.Int, error) {
   191  	return _IBlockReward.Contract.GetReward(&_IBlockReward.CallOpts, _blockNumber)
   192  }
   193  
   194  // GetReward is a free data retrieval call binding the contract method 0x1c4b774b.
   195  //
   196  // Solidity: function getReward(uint256 _blockNumber) constant returns(uint256 amount)
   197  func (_IBlockReward *IBlockRewardCallerSession) GetReward(_blockNumber *big.Int) (*big.Int, error) {
   198  	return _IBlockReward.Contract.GetReward(&_IBlockReward.CallOpts, _blockNumber)
   199  }
   200  
   201  // Reward is a paid mutator transaction binding the contract method 0x228cb733.
   202  //
   203  // Solidity: function reward() returns()
   204  func (_IBlockReward *IBlockRewardTransactor) Reward(opts *bind.TransactOpts) (*types.Transaction, error) {
   205  	return _IBlockReward.contract.Transact(opts, "reward")
   206  }
   207  
   208  // Reward is a paid mutator transaction binding the contract method 0x228cb733.
   209  //
   210  // Solidity: function reward() returns()
   211  func (_IBlockReward *IBlockRewardSession) Reward() (*types.Transaction, error) {
   212  	return _IBlockReward.Contract.Reward(&_IBlockReward.TransactOpts)
   213  }
   214  
   215  // Reward is a paid mutator transaction binding the contract method 0x228cb733.
   216  //
   217  // Solidity: function reward() returns()
   218  func (_IBlockReward *IBlockRewardTransactorSession) Reward() (*types.Transaction, error) {
   219  	return _IBlockReward.Contract.Reward(&_IBlockReward.TransactOpts)
   220  }