github.com/codingfuture/orig-energi3@v0.8.4/energi/abi/StakerRewardV1.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  // StakerRewardV1ABI is the input ABI used to generate the binding from.
    31  const StakerRewardV1ABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractIGovernedContract\",\"name\":\"_newImpl\",\"type\":\"address\"}],\"name\":\"destroy\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"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\":[{\"internalType\":\"contractIGovernedContract\",\"name\":\"_oldImpl\",\"type\":\"address\"}],\"name\":\"migrate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"reward\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"}]"
    32  
    33  // StakerRewardV1Bin is the compiled bytecode used for deploying new contracts.
    34  const StakerRewardV1Bin = `608060405234801561001057600080fd5b506040516103f83803806103f88339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610393806100656000396000f3fe6080604052600436106100595760003560e01c8063228cb73311610043578063228cb7331461013e578063ce5494bb14610146578063ec5568891461018657610059565b8062f55d9d146100c05780631c4b774b14610102575b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420737570706f7274656400000000000000000000000000000000000000604482015290519081900360640190fd5b3480156100cc57600080fd5b50610100600480360360208110156100e357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101c4565b005b34801561010e57600080fd5b5061012c6004803603602081101561012557600080fd5b503561026c565b60408051918252519081900360200190f35b610100610284565b34801561015257600080fd5b506101006004803603602081101561016957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166102b3565b34801561019257600080fd5b5061019b610342565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff16331461024a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742070726f78790000000000000000000000000000000000000000000000604482015290519081900360640190fd5b610253816102b0565b8073ffffffffffffffffffffffffffffffffffffffff16ff5b6000811561027f5750671fa42feb87e400005b919050565b60405141903480156108fc02916000818181858888f193505050501580156102b0573d6000803e3d6000fd5b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461033957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742070726f78790000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6102b0816102b0565b60005473ffffffffffffffffffffffffffffffffffffffff168156fea265627a7a72315820006d66c861983dfd8c6201492e9baed80f76e22fc7acd10953b44f2649d6ffc664736f6c63430005100032`
    35  
    36  // DeployStakerRewardV1 deploys a new Ethereum contract, binding an instance of StakerRewardV1 to it.
    37  func DeployStakerRewardV1(auth *bind.TransactOpts, backend bind.ContractBackend, _proxy common.Address) (common.Address, *types.Transaction, *StakerRewardV1, error) {
    38  	parsed, err := abi.JSON(strings.NewReader(StakerRewardV1ABI))
    39  	if err != nil {
    40  		return common.Address{}, nil, nil, err
    41  	}
    42  	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(StakerRewardV1Bin), backend, _proxy)
    43  	if err != nil {
    44  		return common.Address{}, nil, nil, err
    45  	}
    46  	return address, tx, &StakerRewardV1{StakerRewardV1Caller: StakerRewardV1Caller{contract: contract}, StakerRewardV1Transactor: StakerRewardV1Transactor{contract: contract}, StakerRewardV1Filterer: StakerRewardV1Filterer{contract: contract}}, nil
    47  }
    48  
    49  // StakerRewardV1Bin is the compiled bytecode of contract after deployment.
    50  const StakerRewardV1RuntimeBin = `6080604052600436106100595760003560e01c8063228cb73311610043578063228cb7331461013e578063ce5494bb14610146578063ec5568891461018657610059565b8062f55d9d146100c05780631c4b774b14610102575b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f7420737570706f7274656400000000000000000000000000000000000000604482015290519081900360640190fd5b3480156100cc57600080fd5b50610100600480360360208110156100e357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101c4565b005b34801561010e57600080fd5b5061012c6004803603602081101561012557600080fd5b503561026c565b60408051918252519081900360200190f35b610100610284565b34801561015257600080fd5b506101006004803603602081101561016957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166102b3565b34801561019257600080fd5b5061019b610342565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff16331461024a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742070726f78790000000000000000000000000000000000000000000000604482015290519081900360640190fd5b610253816102b0565b8073ffffffffffffffffffffffffffffffffffffffff16ff5b6000811561027f5750671fa42feb87e400005b919050565b60405141903480156108fc02916000818181858888f193505050501580156102b0573d6000803e3d6000fd5b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461033957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742070726f78790000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6102b0816102b0565b60005473ffffffffffffffffffffffffffffffffffffffff168156fea265627a7a72315820006d66c861983dfd8c6201492e9baed80f76e22fc7acd10953b44f2649d6ffc664736f6c63430005100032`
    51  
    52  // StakerRewardV1 is an auto generated Go binding around an Ethereum contract.
    53  type StakerRewardV1 struct {
    54  	StakerRewardV1Caller     // Read-only binding to the contract
    55  	StakerRewardV1Transactor // Write-only binding to the contract
    56  	StakerRewardV1Filterer   // Log filterer for contract events
    57  }
    58  
    59  // StakerRewardV1Caller is an auto generated read-only Go binding around an Ethereum contract.
    60  type StakerRewardV1Caller struct {
    61  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    62  }
    63  
    64  // StakerRewardV1Transactor is an auto generated write-only Go binding around an Ethereum contract.
    65  type StakerRewardV1Transactor struct {
    66  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    67  }
    68  
    69  // StakerRewardV1Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
    70  type StakerRewardV1Filterer struct {
    71  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    72  }
    73  
    74  // StakerRewardV1Session is an auto generated Go binding around an Ethereum contract,
    75  // with pre-set call and transact options.
    76  type StakerRewardV1Session struct {
    77  	Contract     *StakerRewardV1   // Generic contract binding to set the session for
    78  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    79  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    80  }
    81  
    82  // StakerRewardV1CallerSession is an auto generated read-only Go binding around an Ethereum contract,
    83  // with pre-set call options.
    84  type StakerRewardV1CallerSession struct {
    85  	Contract *StakerRewardV1Caller // Generic contract caller binding to set the session for
    86  	CallOpts bind.CallOpts         // Call options to use throughout this session
    87  }
    88  
    89  // StakerRewardV1TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    90  // with pre-set transact options.
    91  type StakerRewardV1TransactorSession struct {
    92  	Contract     *StakerRewardV1Transactor // Generic contract transactor binding to set the session for
    93  	TransactOpts bind.TransactOpts         // Transaction auth options to use throughout this session
    94  }
    95  
    96  // StakerRewardV1Raw is an auto generated low-level Go binding around an Ethereum contract.
    97  type StakerRewardV1Raw struct {
    98  	Contract *StakerRewardV1 // Generic contract binding to access the raw methods on
    99  }
   100  
   101  // StakerRewardV1CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   102  type StakerRewardV1CallerRaw struct {
   103  	Contract *StakerRewardV1Caller // Generic read-only contract binding to access the raw methods on
   104  }
   105  
   106  // StakerRewardV1TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   107  type StakerRewardV1TransactorRaw struct {
   108  	Contract *StakerRewardV1Transactor // Generic write-only contract binding to access the raw methods on
   109  }
   110  
   111  // NewStakerRewardV1 creates a new instance of StakerRewardV1, bound to a specific deployed contract.
   112  func NewStakerRewardV1(address common.Address, backend bind.ContractBackend) (*StakerRewardV1, error) {
   113  	contract, err := bindStakerRewardV1(address, backend, backend, backend)
   114  	if err != nil {
   115  		return nil, err
   116  	}
   117  	return &StakerRewardV1{StakerRewardV1Caller: StakerRewardV1Caller{contract: contract}, StakerRewardV1Transactor: StakerRewardV1Transactor{contract: contract}, StakerRewardV1Filterer: StakerRewardV1Filterer{contract: contract}}, nil
   118  }
   119  
   120  // NewStakerRewardV1Caller creates a new read-only instance of StakerRewardV1, bound to a specific deployed contract.
   121  func NewStakerRewardV1Caller(address common.Address, caller bind.ContractCaller) (*StakerRewardV1Caller, error) {
   122  	contract, err := bindStakerRewardV1(address, caller, nil, nil)
   123  	if err != nil {
   124  		return nil, err
   125  	}
   126  	return &StakerRewardV1Caller{contract: contract}, nil
   127  }
   128  
   129  // NewStakerRewardV1Transactor creates a new write-only instance of StakerRewardV1, bound to a specific deployed contract.
   130  func NewStakerRewardV1Transactor(address common.Address, transactor bind.ContractTransactor) (*StakerRewardV1Transactor, error) {
   131  	contract, err := bindStakerRewardV1(address, nil, transactor, nil)
   132  	if err != nil {
   133  		return nil, err
   134  	}
   135  	return &StakerRewardV1Transactor{contract: contract}, nil
   136  }
   137  
   138  // NewStakerRewardV1Filterer creates a new log filterer instance of StakerRewardV1, bound to a specific deployed contract.
   139  func NewStakerRewardV1Filterer(address common.Address, filterer bind.ContractFilterer) (*StakerRewardV1Filterer, error) {
   140  	contract, err := bindStakerRewardV1(address, nil, nil, filterer)
   141  	if err != nil {
   142  		return nil, err
   143  	}
   144  	return &StakerRewardV1Filterer{contract: contract}, nil
   145  }
   146  
   147  // bindStakerRewardV1 binds a generic wrapper to an already deployed contract.
   148  func bindStakerRewardV1(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   149  	parsed, err := abi.JSON(strings.NewReader(StakerRewardV1ABI))
   150  	if err != nil {
   151  		return nil, err
   152  	}
   153  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   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 (_StakerRewardV1 *StakerRewardV1Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   161  	return _StakerRewardV1.Contract.StakerRewardV1Caller.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 (_StakerRewardV1 *StakerRewardV1Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   167  	return _StakerRewardV1.Contract.StakerRewardV1Transactor.contract.Transfer(opts)
   168  }
   169  
   170  // Transact invokes the (paid) contract method with params as input values.
   171  func (_StakerRewardV1 *StakerRewardV1Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   172  	return _StakerRewardV1.Contract.StakerRewardV1Transactor.contract.Transact(opts, method, params...)
   173  }
   174  
   175  // Call invokes the (constant) contract method with params as input values and
   176  // sets the output to result. The result type might be a single field for simple
   177  // returns, a slice of interfaces for anonymous returns and a struct for named
   178  // returns.
   179  func (_StakerRewardV1 *StakerRewardV1CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   180  	return _StakerRewardV1.Contract.contract.Call(opts, result, method, params...)
   181  }
   182  
   183  // Transfer initiates a plain transaction to move funds to the contract, calling
   184  // its default method if one is available.
   185  func (_StakerRewardV1 *StakerRewardV1TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   186  	return _StakerRewardV1.Contract.contract.Transfer(opts)
   187  }
   188  
   189  // Transact invokes the (paid) contract method with params as input values.
   190  func (_StakerRewardV1 *StakerRewardV1TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   191  	return _StakerRewardV1.Contract.contract.Transact(opts, method, params...)
   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 (_StakerRewardV1 *StakerRewardV1Caller) GetReward(opts *bind.CallOpts, _blockNumber *big.Int) (*big.Int, error) {
   198  	var (
   199  		ret0 = new(*big.Int)
   200  	)
   201  	out := ret0
   202  	err := _StakerRewardV1.contract.Call(opts, out, "getReward", _blockNumber)
   203  	return *ret0, err
   204  }
   205  
   206  // GetReward is a free data retrieval call binding the contract method 0x1c4b774b.
   207  //
   208  // Solidity: function getReward(uint256 _blockNumber) constant returns(uint256 amount)
   209  func (_StakerRewardV1 *StakerRewardV1Session) GetReward(_blockNumber *big.Int) (*big.Int, error) {
   210  	return _StakerRewardV1.Contract.GetReward(&_StakerRewardV1.CallOpts, _blockNumber)
   211  }
   212  
   213  // GetReward is a free data retrieval call binding the contract method 0x1c4b774b.
   214  //
   215  // Solidity: function getReward(uint256 _blockNumber) constant returns(uint256 amount)
   216  func (_StakerRewardV1 *StakerRewardV1CallerSession) GetReward(_blockNumber *big.Int) (*big.Int, error) {
   217  	return _StakerRewardV1.Contract.GetReward(&_StakerRewardV1.CallOpts, _blockNumber)
   218  }
   219  
   220  // Proxy is a free data retrieval call binding the contract method 0xec556889.
   221  //
   222  // Solidity: function proxy() constant returns(address)
   223  func (_StakerRewardV1 *StakerRewardV1Caller) Proxy(opts *bind.CallOpts) (common.Address, error) {
   224  	var (
   225  		ret0 = new(common.Address)
   226  	)
   227  	out := ret0
   228  	err := _StakerRewardV1.contract.Call(opts, out, "proxy")
   229  	return *ret0, err
   230  }
   231  
   232  // Proxy is a free data retrieval call binding the contract method 0xec556889.
   233  //
   234  // Solidity: function proxy() constant returns(address)
   235  func (_StakerRewardV1 *StakerRewardV1Session) Proxy() (common.Address, error) {
   236  	return _StakerRewardV1.Contract.Proxy(&_StakerRewardV1.CallOpts)
   237  }
   238  
   239  // Proxy is a free data retrieval call binding the contract method 0xec556889.
   240  //
   241  // Solidity: function proxy() constant returns(address)
   242  func (_StakerRewardV1 *StakerRewardV1CallerSession) Proxy() (common.Address, error) {
   243  	return _StakerRewardV1.Contract.Proxy(&_StakerRewardV1.CallOpts)
   244  }
   245  
   246  // Destroy is a paid mutator transaction binding the contract method 0x00f55d9d.
   247  //
   248  // Solidity: function destroy(address _newImpl) returns()
   249  func (_StakerRewardV1 *StakerRewardV1Transactor) Destroy(opts *bind.TransactOpts, _newImpl common.Address) (*types.Transaction, error) {
   250  	return _StakerRewardV1.contract.Transact(opts, "destroy", _newImpl)
   251  }
   252  
   253  // Destroy is a paid mutator transaction binding the contract method 0x00f55d9d.
   254  //
   255  // Solidity: function destroy(address _newImpl) returns()
   256  func (_StakerRewardV1 *StakerRewardV1Session) Destroy(_newImpl common.Address) (*types.Transaction, error) {
   257  	return _StakerRewardV1.Contract.Destroy(&_StakerRewardV1.TransactOpts, _newImpl)
   258  }
   259  
   260  // Destroy is a paid mutator transaction binding the contract method 0x00f55d9d.
   261  //
   262  // Solidity: function destroy(address _newImpl) returns()
   263  func (_StakerRewardV1 *StakerRewardV1TransactorSession) Destroy(_newImpl common.Address) (*types.Transaction, error) {
   264  	return _StakerRewardV1.Contract.Destroy(&_StakerRewardV1.TransactOpts, _newImpl)
   265  }
   266  
   267  // Migrate is a paid mutator transaction binding the contract method 0xce5494bb.
   268  //
   269  // Solidity: function migrate(address _oldImpl) returns()
   270  func (_StakerRewardV1 *StakerRewardV1Transactor) Migrate(opts *bind.TransactOpts, _oldImpl common.Address) (*types.Transaction, error) {
   271  	return _StakerRewardV1.contract.Transact(opts, "migrate", _oldImpl)
   272  }
   273  
   274  // Migrate is a paid mutator transaction binding the contract method 0xce5494bb.
   275  //
   276  // Solidity: function migrate(address _oldImpl) returns()
   277  func (_StakerRewardV1 *StakerRewardV1Session) Migrate(_oldImpl common.Address) (*types.Transaction, error) {
   278  	return _StakerRewardV1.Contract.Migrate(&_StakerRewardV1.TransactOpts, _oldImpl)
   279  }
   280  
   281  // Migrate is a paid mutator transaction binding the contract method 0xce5494bb.
   282  //
   283  // Solidity: function migrate(address _oldImpl) returns()
   284  func (_StakerRewardV1 *StakerRewardV1TransactorSession) Migrate(_oldImpl common.Address) (*types.Transaction, error) {
   285  	return _StakerRewardV1.Contract.Migrate(&_StakerRewardV1.TransactOpts, _oldImpl)
   286  }
   287  
   288  // Reward is a paid mutator transaction binding the contract method 0x228cb733.
   289  //
   290  // Solidity: function reward() returns()
   291  func (_StakerRewardV1 *StakerRewardV1Transactor) Reward(opts *bind.TransactOpts) (*types.Transaction, error) {
   292  	return _StakerRewardV1.contract.Transact(opts, "reward")
   293  }
   294  
   295  // Reward is a paid mutator transaction binding the contract method 0x228cb733.
   296  //
   297  // Solidity: function reward() returns()
   298  func (_StakerRewardV1 *StakerRewardV1Session) Reward() (*types.Transaction, error) {
   299  	return _StakerRewardV1.Contract.Reward(&_StakerRewardV1.TransactOpts)
   300  }
   301  
   302  // Reward is a paid mutator transaction binding the contract method 0x228cb733.
   303  //
   304  // Solidity: function reward() returns()
   305  func (_StakerRewardV1 *StakerRewardV1TransactorSession) Reward() (*types.Transaction, error) {
   306  	return _StakerRewardV1.Contract.Reward(&_StakerRewardV1.TransactOpts)
   307  }