github.com/cwntr/go-defi@v0.0.0-20210629134751-07f9ec2f7e66/binding/herc20tokenin/herc20tokenin.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 herc20tokenin 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 // Herc20tokeninABI is the input ABI used to generate the binding from. 30 const Herc20tokeninABI = "[{\"constant\":false,\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"inject\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"postProcess\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"}]" 31 32 // Herc20tokenin is an auto generated Go binding around an Ethereum contract. 33 type Herc20tokenin struct { 34 Herc20tokeninCaller // Read-only binding to the contract 35 Herc20tokeninTransactor // Write-only binding to the contract 36 Herc20tokeninFilterer // Log filterer for contract events 37 } 38 39 // Herc20tokeninCaller is an auto generated read-only Go binding around an Ethereum contract. 40 type Herc20tokeninCaller struct { 41 contract *bind.BoundContract // Generic contract wrapper for the low level calls 42 } 43 44 // Herc20tokeninTransactor is an auto generated write-only Go binding around an Ethereum contract. 45 type Herc20tokeninTransactor struct { 46 contract *bind.BoundContract // Generic contract wrapper for the low level calls 47 } 48 49 // Herc20tokeninFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 50 type Herc20tokeninFilterer struct { 51 contract *bind.BoundContract // Generic contract wrapper for the low level calls 52 } 53 54 // Herc20tokeninSession is an auto generated Go binding around an Ethereum contract, 55 // with pre-set call and transact options. 56 type Herc20tokeninSession struct { 57 Contract *Herc20tokenin // 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 // Herc20tokeninCallerSession is an auto generated read-only Go binding around an Ethereum contract, 63 // with pre-set call options. 64 type Herc20tokeninCallerSession struct { 65 Contract *Herc20tokeninCaller // Generic contract caller binding to set the session for 66 CallOpts bind.CallOpts // Call options to use throughout this session 67 } 68 69 // Herc20tokeninTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 70 // with pre-set transact options. 71 type Herc20tokeninTransactorSession struct { 72 Contract *Herc20tokeninTransactor // Generic contract transactor binding to set the session for 73 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 74 } 75 76 // Herc20tokeninRaw is an auto generated low-level Go binding around an Ethereum contract. 77 type Herc20tokeninRaw struct { 78 Contract *Herc20tokenin // Generic contract binding to access the raw methods on 79 } 80 81 // Herc20tokeninCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 82 type Herc20tokeninCallerRaw struct { 83 Contract *Herc20tokeninCaller // Generic read-only contract binding to access the raw methods on 84 } 85 86 // Herc20tokeninTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 87 type Herc20tokeninTransactorRaw struct { 88 Contract *Herc20tokeninTransactor // Generic write-only contract binding to access the raw methods on 89 } 90 91 // NewHerc20tokenin creates a new instance of Herc20tokenin, bound to a specific deployed contract. 92 func NewHerc20tokenin(address common.Address, backend bind.ContractBackend) (*Herc20tokenin, error) { 93 contract, err := bindHerc20tokenin(address, backend, backend, backend) 94 if err != nil { 95 return nil, err 96 } 97 return &Herc20tokenin{Herc20tokeninCaller: Herc20tokeninCaller{contract: contract}, Herc20tokeninTransactor: Herc20tokeninTransactor{contract: contract}, Herc20tokeninFilterer: Herc20tokeninFilterer{contract: contract}}, nil 98 } 99 100 // NewHerc20tokeninCaller creates a new read-only instance of Herc20tokenin, bound to a specific deployed contract. 101 func NewHerc20tokeninCaller(address common.Address, caller bind.ContractCaller) (*Herc20tokeninCaller, error) { 102 contract, err := bindHerc20tokenin(address, caller, nil, nil) 103 if err != nil { 104 return nil, err 105 } 106 return &Herc20tokeninCaller{contract: contract}, nil 107 } 108 109 // NewHerc20tokeninTransactor creates a new write-only instance of Herc20tokenin, bound to a specific deployed contract. 110 func NewHerc20tokeninTransactor(address common.Address, transactor bind.ContractTransactor) (*Herc20tokeninTransactor, error) { 111 contract, err := bindHerc20tokenin(address, nil, transactor, nil) 112 if err != nil { 113 return nil, err 114 } 115 return &Herc20tokeninTransactor{contract: contract}, nil 116 } 117 118 // NewHerc20tokeninFilterer creates a new log filterer instance of Herc20tokenin, bound to a specific deployed contract. 119 func NewHerc20tokeninFilterer(address common.Address, filterer bind.ContractFilterer) (*Herc20tokeninFilterer, error) { 120 contract, err := bindHerc20tokenin(address, nil, nil, filterer) 121 if err != nil { 122 return nil, err 123 } 124 return &Herc20tokeninFilterer{contract: contract}, nil 125 } 126 127 // bindHerc20tokenin binds a generic wrapper to an already deployed contract. 128 func bindHerc20tokenin(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 129 parsed, err := abi.JSON(strings.NewReader(Herc20tokeninABI)) 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 (_Herc20tokenin *Herc20tokeninRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 141 return _Herc20tokenin.Contract.Herc20tokeninCaller.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 (_Herc20tokenin *Herc20tokeninRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 147 return _Herc20tokenin.Contract.Herc20tokeninTransactor.contract.Transfer(opts) 148 } 149 150 // Transact invokes the (paid) contract method with params as input values. 151 func (_Herc20tokenin *Herc20tokeninRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 152 return _Herc20tokenin.Contract.Herc20tokeninTransactor.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 (_Herc20tokenin *Herc20tokeninCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 160 return _Herc20tokenin.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 (_Herc20tokenin *Herc20tokeninTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 166 return _Herc20tokenin.Contract.contract.Transfer(opts) 167 } 168 169 // Transact invokes the (paid) contract method with params as input values. 170 func (_Herc20tokenin *Herc20tokeninTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 171 return _Herc20tokenin.Contract.contract.Transact(opts, method, params...) 172 } 173 174 // Inject is a paid mutator transaction binding the contract method 0xd0797f84. 175 // 176 // Solidity: function inject(address[] tokens, uint256[] amounts) payable returns() 177 func (_Herc20tokenin *Herc20tokeninTransactor) Inject(opts *bind.TransactOpts, tokens []common.Address, amounts []*big.Int) (*types.Transaction, error) { 178 return _Herc20tokenin.contract.Transact(opts, "inject", tokens, amounts) 179 } 180 181 // Inject is a paid mutator transaction binding the contract method 0xd0797f84. 182 // 183 // Solidity: function inject(address[] tokens, uint256[] amounts) payable returns() 184 func (_Herc20tokenin *Herc20tokeninSession) Inject(tokens []common.Address, amounts []*big.Int) (*types.Transaction, error) { 185 return _Herc20tokenin.Contract.Inject(&_Herc20tokenin.TransactOpts, tokens, amounts) 186 } 187 188 // Inject is a paid mutator transaction binding the contract method 0xd0797f84. 189 // 190 // Solidity: function inject(address[] tokens, uint256[] amounts) payable returns() 191 func (_Herc20tokenin *Herc20tokeninTransactorSession) Inject(tokens []common.Address, amounts []*big.Int) (*types.Transaction, error) { 192 return _Herc20tokenin.Contract.Inject(&_Herc20tokenin.TransactOpts, tokens, amounts) 193 } 194 195 // PostProcess is a paid mutator transaction binding the contract method 0xc2722916. 196 // 197 // Solidity: function postProcess() payable returns() 198 func (_Herc20tokenin *Herc20tokeninTransactor) PostProcess(opts *bind.TransactOpts) (*types.Transaction, error) { 199 return _Herc20tokenin.contract.Transact(opts, "postProcess") 200 } 201 202 // PostProcess is a paid mutator transaction binding the contract method 0xc2722916. 203 // 204 // Solidity: function postProcess() payable returns() 205 func (_Herc20tokenin *Herc20tokeninSession) PostProcess() (*types.Transaction, error) { 206 return _Herc20tokenin.Contract.PostProcess(&_Herc20tokenin.TransactOpts) 207 } 208 209 // PostProcess is a paid mutator transaction binding the contract method 0xc2722916. 210 // 211 // Solidity: function postProcess() payable returns() 212 func (_Herc20tokenin *Herc20tokeninTransactorSession) PostProcess() (*types.Transaction, error) { 213 return _Herc20tokenin.Contract.PostProcess(&_Herc20tokenin.TransactOpts) 214 }