github.com/cwntr/go-defi@v0.0.0-20210629134751-07f9ec2f7e66/binding/hcether/hcether.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 hcether
     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  	_ = bind.Bind
    24  	_ = common.Big1
    25  	_ = types.BloomLookup
    26  	_ = event.NewSubscription
    27  )
    28  
    29  // HcetherABI is the input ABI used to generate the binding from.
    30  const HcetherABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"CETHER\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"postProcess\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlying\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"}],\"name\":\"repayBorrowBehalf\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"}]"
    31  
    32  // Hcether is an auto generated Go binding around an Ethereum contract.
    33  type Hcether struct {
    34  	HcetherCaller     // Read-only binding to the contract
    35  	HcetherTransactor // Write-only binding to the contract
    36  	HcetherFilterer   // Log filterer for contract events
    37  }
    38  
    39  // HcetherCaller is an auto generated read-only Go binding around an Ethereum contract.
    40  type HcetherCaller struct {
    41  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    42  }
    43  
    44  // HcetherTransactor is an auto generated write-only Go binding around an Ethereum contract.
    45  type HcetherTransactor struct {
    46  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    47  }
    48  
    49  // HcetherFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    50  type HcetherFilterer struct {
    51  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    52  }
    53  
    54  // HcetherSession is an auto generated Go binding around an Ethereum contract,
    55  // with pre-set call and transact options.
    56  type HcetherSession struct {
    57  	Contract     *Hcether          // Generic contract binding to set the session for
    58  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    59  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    60  }
    61  
    62  // HcetherCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    63  // with pre-set call options.
    64  type HcetherCallerSession struct {
    65  	Contract *HcetherCaller // Generic contract caller binding to set the session for
    66  	CallOpts bind.CallOpts  // Call options to use throughout this session
    67  }
    68  
    69  // HcetherTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    70  // with pre-set transact options.
    71  type HcetherTransactorSession struct {
    72  	Contract     *HcetherTransactor // Generic contract transactor binding to set the session for
    73  	TransactOpts bind.TransactOpts  // Transaction auth options to use throughout this session
    74  }
    75  
    76  // HcetherRaw is an auto generated low-level Go binding around an Ethereum contract.
    77  type HcetherRaw struct {
    78  	Contract *Hcether // Generic contract binding to access the raw methods on
    79  }
    80  
    81  // HcetherCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
    82  type HcetherCallerRaw struct {
    83  	Contract *HcetherCaller // Generic read-only contract binding to access the raw methods on
    84  }
    85  
    86  // HcetherTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
    87  type HcetherTransactorRaw struct {
    88  	Contract *HcetherTransactor // Generic write-only contract binding to access the raw methods on
    89  }
    90  
    91  // NewHcether creates a new instance of Hcether, bound to a specific deployed contract.
    92  func NewHcether(address common.Address, backend bind.ContractBackend) (*Hcether, error) {
    93  	contract, err := bindHcether(address, backend, backend, backend)
    94  	if err != nil {
    95  		return nil, err
    96  	}
    97  	return &Hcether{HcetherCaller: HcetherCaller{contract: contract}, HcetherTransactor: HcetherTransactor{contract: contract}, HcetherFilterer: HcetherFilterer{contract: contract}}, nil
    98  }
    99  
   100  // NewHcetherCaller creates a new read-only instance of Hcether, bound to a specific deployed contract.
   101  func NewHcetherCaller(address common.Address, caller bind.ContractCaller) (*HcetherCaller, error) {
   102  	contract, err := bindHcether(address, caller, nil, nil)
   103  	if err != nil {
   104  		return nil, err
   105  	}
   106  	return &HcetherCaller{contract: contract}, nil
   107  }
   108  
   109  // NewHcetherTransactor creates a new write-only instance of Hcether, bound to a specific deployed contract.
   110  func NewHcetherTransactor(address common.Address, transactor bind.ContractTransactor) (*HcetherTransactor, error) {
   111  	contract, err := bindHcether(address, nil, transactor, nil)
   112  	if err != nil {
   113  		return nil, err
   114  	}
   115  	return &HcetherTransactor{contract: contract}, nil
   116  }
   117  
   118  // NewHcetherFilterer creates a new log filterer instance of Hcether, bound to a specific deployed contract.
   119  func NewHcetherFilterer(address common.Address, filterer bind.ContractFilterer) (*HcetherFilterer, error) {
   120  	contract, err := bindHcether(address, nil, nil, filterer)
   121  	if err != nil {
   122  		return nil, err
   123  	}
   124  	return &HcetherFilterer{contract: contract}, nil
   125  }
   126  
   127  // bindHcether binds a generic wrapper to an already deployed contract.
   128  func bindHcether(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   129  	parsed, err := abi.JSON(strings.NewReader(HcetherABI))
   130  	if err != nil {
   131  		return nil, err
   132  	}
   133  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   134  }
   135  
   136  // Call invokes the (constant) contract method with params as input values and
   137  // sets the output to result. The result type might be a single field for simple
   138  // returns, a slice of interfaces for anonymous returns and a struct for named
   139  // returns.
   140  func (_Hcether *HcetherRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   141  	return _Hcether.Contract.HcetherCaller.contract.Call(opts, result, method, params...)
   142  }
   143  
   144  // Transfer initiates a plain transaction to move funds to the contract, calling
   145  // its default method if one is available.
   146  func (_Hcether *HcetherRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   147  	return _Hcether.Contract.HcetherTransactor.contract.Transfer(opts)
   148  }
   149  
   150  // Transact invokes the (paid) contract method with params as input values.
   151  func (_Hcether *HcetherRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   152  	return _Hcether.Contract.HcetherTransactor.contract.Transact(opts, method, params...)
   153  }
   154  
   155  // Call invokes the (constant) contract method with params as input values and
   156  // sets the output to result. The result type might be a single field for simple
   157  // returns, a slice of interfaces for anonymous returns and a struct for named
   158  // returns.
   159  func (_Hcether *HcetherCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   160  	return _Hcether.Contract.contract.Call(opts, result, method, params...)
   161  }
   162  
   163  // Transfer initiates a plain transaction to move funds to the contract, calling
   164  // its default method if one is available.
   165  func (_Hcether *HcetherTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   166  	return _Hcether.Contract.contract.Transfer(opts)
   167  }
   168  
   169  // Transact invokes the (paid) contract method with params as input values.
   170  func (_Hcether *HcetherTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   171  	return _Hcether.Contract.contract.Transact(opts, method, params...)
   172  }
   173  
   174  // CETHER is a free data retrieval call binding the contract method 0x092a5781.
   175  //
   176  // Solidity: function CETHER() view returns(address)
   177  func (_Hcether *HcetherCaller) CETHER(opts *bind.CallOpts) (common.Address, error) {
   178  	var out []interface{}
   179  	err := _Hcether.contract.Call(opts, &out, "CETHER")
   180  
   181  	if err != nil {
   182  		return *new(common.Address), err
   183  	}
   184  
   185  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   186  
   187  	return out0, err
   188  
   189  }
   190  
   191  // CETHER is a free data retrieval call binding the contract method 0x092a5781.
   192  //
   193  // Solidity: function CETHER() view returns(address)
   194  func (_Hcether *HcetherSession) CETHER() (common.Address, error) {
   195  	return _Hcether.Contract.CETHER(&_Hcether.CallOpts)
   196  }
   197  
   198  // CETHER is a free data retrieval call binding the contract method 0x092a5781.
   199  //
   200  // Solidity: function CETHER() view returns(address)
   201  func (_Hcether *HcetherCallerSession) CETHER() (common.Address, error) {
   202  	return _Hcether.Contract.CETHER(&_Hcether.CallOpts)
   203  }
   204  
   205  // Mint is a paid mutator transaction binding the contract method 0xa0712d68.
   206  //
   207  // Solidity: function mint(uint256 value) payable returns()
   208  func (_Hcether *HcetherTransactor) Mint(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) {
   209  	return _Hcether.contract.Transact(opts, "mint", value)
   210  }
   211  
   212  // Mint is a paid mutator transaction binding the contract method 0xa0712d68.
   213  //
   214  // Solidity: function mint(uint256 value) payable returns()
   215  func (_Hcether *HcetherSession) Mint(value *big.Int) (*types.Transaction, error) {
   216  	return _Hcether.Contract.Mint(&_Hcether.TransactOpts, value)
   217  }
   218  
   219  // Mint is a paid mutator transaction binding the contract method 0xa0712d68.
   220  //
   221  // Solidity: function mint(uint256 value) payable returns()
   222  func (_Hcether *HcetherTransactorSession) Mint(value *big.Int) (*types.Transaction, error) {
   223  	return _Hcether.Contract.Mint(&_Hcether.TransactOpts, value)
   224  }
   225  
   226  // PostProcess is a paid mutator transaction binding the contract method 0xc2722916.
   227  //
   228  // Solidity: function postProcess() payable returns()
   229  func (_Hcether *HcetherTransactor) PostProcess(opts *bind.TransactOpts) (*types.Transaction, error) {
   230  	return _Hcether.contract.Transact(opts, "postProcess")
   231  }
   232  
   233  // PostProcess is a paid mutator transaction binding the contract method 0xc2722916.
   234  //
   235  // Solidity: function postProcess() payable returns()
   236  func (_Hcether *HcetherSession) PostProcess() (*types.Transaction, error) {
   237  	return _Hcether.Contract.PostProcess(&_Hcether.TransactOpts)
   238  }
   239  
   240  // PostProcess is a paid mutator transaction binding the contract method 0xc2722916.
   241  //
   242  // Solidity: function postProcess() payable returns()
   243  func (_Hcether *HcetherTransactorSession) PostProcess() (*types.Transaction, error) {
   244  	return _Hcether.Contract.PostProcess(&_Hcether.TransactOpts)
   245  }
   246  
   247  // Redeem is a paid mutator transaction binding the contract method 0xdb006a75.
   248  //
   249  // Solidity: function redeem(uint256 redeemTokens) payable returns()
   250  func (_Hcether *HcetherTransactor) Redeem(opts *bind.TransactOpts, redeemTokens *big.Int) (*types.Transaction, error) {
   251  	return _Hcether.contract.Transact(opts, "redeem", redeemTokens)
   252  }
   253  
   254  // Redeem is a paid mutator transaction binding the contract method 0xdb006a75.
   255  //
   256  // Solidity: function redeem(uint256 redeemTokens) payable returns()
   257  func (_Hcether *HcetherSession) Redeem(redeemTokens *big.Int) (*types.Transaction, error) {
   258  	return _Hcether.Contract.Redeem(&_Hcether.TransactOpts, redeemTokens)
   259  }
   260  
   261  // Redeem is a paid mutator transaction binding the contract method 0xdb006a75.
   262  //
   263  // Solidity: function redeem(uint256 redeemTokens) payable returns()
   264  func (_Hcether *HcetherTransactorSession) Redeem(redeemTokens *big.Int) (*types.Transaction, error) {
   265  	return _Hcether.Contract.Redeem(&_Hcether.TransactOpts, redeemTokens)
   266  }
   267  
   268  // RedeemUnderlying is a paid mutator transaction binding the contract method 0x852a12e3.
   269  //
   270  // Solidity: function redeemUnderlying(uint256 redeemAmount) payable returns()
   271  func (_Hcether *HcetherTransactor) RedeemUnderlying(opts *bind.TransactOpts, redeemAmount *big.Int) (*types.Transaction, error) {
   272  	return _Hcether.contract.Transact(opts, "redeemUnderlying", redeemAmount)
   273  }
   274  
   275  // RedeemUnderlying is a paid mutator transaction binding the contract method 0x852a12e3.
   276  //
   277  // Solidity: function redeemUnderlying(uint256 redeemAmount) payable returns()
   278  func (_Hcether *HcetherSession) RedeemUnderlying(redeemAmount *big.Int) (*types.Transaction, error) {
   279  	return _Hcether.Contract.RedeemUnderlying(&_Hcether.TransactOpts, redeemAmount)
   280  }
   281  
   282  // RedeemUnderlying is a paid mutator transaction binding the contract method 0x852a12e3.
   283  //
   284  // Solidity: function redeemUnderlying(uint256 redeemAmount) payable returns()
   285  func (_Hcether *HcetherTransactorSession) RedeemUnderlying(redeemAmount *big.Int) (*types.Transaction, error) {
   286  	return _Hcether.Contract.RedeemUnderlying(&_Hcether.TransactOpts, redeemAmount)
   287  }
   288  
   289  // RepayBorrowBehalf is a paid mutator transaction binding the contract method 0xaa553b61.
   290  //
   291  // Solidity: function repayBorrowBehalf(uint256 amount, address borrower) payable returns()
   292  func (_Hcether *HcetherTransactor) RepayBorrowBehalf(opts *bind.TransactOpts, amount *big.Int, borrower common.Address) (*types.Transaction, error) {
   293  	return _Hcether.contract.Transact(opts, "repayBorrowBehalf", amount, borrower)
   294  }
   295  
   296  // RepayBorrowBehalf is a paid mutator transaction binding the contract method 0xaa553b61.
   297  //
   298  // Solidity: function repayBorrowBehalf(uint256 amount, address borrower) payable returns()
   299  func (_Hcether *HcetherSession) RepayBorrowBehalf(amount *big.Int, borrower common.Address) (*types.Transaction, error) {
   300  	return _Hcether.Contract.RepayBorrowBehalf(&_Hcether.TransactOpts, amount, borrower)
   301  }
   302  
   303  // RepayBorrowBehalf is a paid mutator transaction binding the contract method 0xaa553b61.
   304  //
   305  // Solidity: function repayBorrowBehalf(uint256 amount, address borrower) payable returns()
   306  func (_Hcether *HcetherTransactorSession) RepayBorrowBehalf(amount *big.Int, borrower common.Address) (*types.Transaction, error) {
   307  	return _Hcether.Contract.RepayBorrowBehalf(&_Hcether.TransactOpts, amount, borrower)
   308  }