github.com/0xsequence/ethkit@v1.25.0/cmd/chain-blast/erc20_mock.gen.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 main 5 6 import ( 7 "math/big" 8 "strings" 9 10 ethereum "github.com/0xsequence/ethkit/go-ethereum" 11 "github.com/0xsequence/ethkit/go-ethereum/accounts/abi" 12 "github.com/0xsequence/ethkit/go-ethereum/accounts/abi/bind" 13 "github.com/0xsequence/ethkit/go-ethereum/common" 14 "github.com/0xsequence/ethkit/go-ethereum/core/types" 15 "github.com/0xsequence/ethkit/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 // ERC20MockABI is the input ABI used to generate the binding from. 30 const ERC20MockABI = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"batchTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mockMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" 31 32 // ERC20MockBin is the compiled bytecode used for deploying new contracts. 33 var ERC20MockBin = "0x608060405234801561001057600080fd5b50610997806100206000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80633950935111610076578063a457c2d71161005b578063a457c2d7146102f0578063a9059cbb14610329578063dd62ed3e14610362576100be565b8063395093511461028457806370a08231146102bd576100be565b806323b872dd116100a757806323b872dd1461012a5780632e72102f1461016d578063378934b41461024b576100be565b8063095ea7b3146100c357806318160ddd14610110575b600080fd5b6100fc600480360360408110156100d957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561039d565b604080519115158252519081900360200190f35b6101186103b3565b60408051918252519081900360200190f35b6100fc6004803603606081101561014057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356103b9565b6102496004803603606081101561018357600080fd5b81019060208101813564010000000081111561019e57600080fd5b8201836020820111156101b057600080fd5b803590602001918460208302840111640100000000831117156101d257600080fd5b9193909273ffffffffffffffffffffffffffffffffffffffff8335169260408101906020013564010000000081111561020a57600080fd5b82018360208201111561021c57600080fd5b8035906020019184602083028401116401000000008311171561023e57600080fd5b509092509050610417565b005b6102496004803603604081101561026157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610509565b6100fc6004803603604081101561029a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610517565b610118600480360360208110156102d357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661055a565b6100fc6004803603604081101561030657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610582565b6100fc6004803603604081101561033f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356105c5565b6101186004803603604081101561037857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166105d2565b60006103aa33848461060a565b50600192915050565b60025490565b60006103c68484846106b9565b73ffffffffffffffffffffffffffffffffffffffff841660009081526001602090815260408083203380855292529091205461040d91869161040890866107ac565b61060a565b5060019392505050565b60005b818110156105015785858281811061042e57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585858581811061047357fe5b905060200201356040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156104cd57600080fd5b505af11580156104e1573d6000803e3d6000fd5b505050506040513d60208110156104f757600080fd5b505060010161041a565b505050505050565b6105138282610823565b5050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490916103aa91859061040890866108e6565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490916103aa91859061040890866107ac565b60006103aa3384846106b9565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b73ffffffffffffffffffffffffffffffffffffffff821661062a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff831661064a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff82166106d957600080fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205461070990826107ac565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220939093559084168152205461074590826108e6565b73ffffffffffffffffffffffffffffffffffffffff8084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282111561081d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f536166654d617468237375623a20554e444552464c4f57000000000000000000604482015290519081900360640190fd5b50900390565b73ffffffffffffffffffffffffffffffffffffffff821661084357600080fd5b60025461085090826108e6565b60025573ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205461088390826108e6565b73ffffffffffffffffffffffffffffffffffffffff83166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008282018381101561095a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f536166654d617468236164643a204f564552464c4f5700000000000000000000604482015290519081900360640190fd5b939250505056fea26469706673582212201e8282683b3b9580e5722aa29d3e976acdd4cd35c3e88cdd1abb688867d0547a64736f6c63430007040033" 34 35 // DeployERC20Mock deploys a new Ethereum contract, binding an instance of ERC20Mock to it. 36 func DeployERC20Mock(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20Mock, error) { 37 parsed, err := abi.JSON(strings.NewReader(ERC20MockABI)) 38 if err != nil { 39 return common.Address{}, nil, nil, err 40 } 41 42 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20MockBin), backend) 43 if err != nil { 44 return common.Address{}, nil, nil, err 45 } 46 return address, tx, &ERC20Mock{ERC20MockCaller: ERC20MockCaller{contract: contract}, ERC20MockTransactor: ERC20MockTransactor{contract: contract}, ERC20MockFilterer: ERC20MockFilterer{contract: contract}}, nil 47 } 48 49 // ERC20Mock is an auto generated Go binding around an Ethereum contract. 50 type ERC20Mock struct { 51 ERC20MockCaller // Read-only binding to the contract 52 ERC20MockTransactor // Write-only binding to the contract 53 ERC20MockFilterer // Log filterer for contract events 54 } 55 56 // ERC20MockCaller is an auto generated read-only Go binding around an Ethereum contract. 57 type ERC20MockCaller struct { 58 contract *bind.BoundContract // Generic contract wrapper for the low level calls 59 } 60 61 // ERC20MockTransactor is an auto generated write-only Go binding around an Ethereum contract. 62 type ERC20MockTransactor struct { 63 contract *bind.BoundContract // Generic contract wrapper for the low level calls 64 } 65 66 // ERC20MockFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 67 type ERC20MockFilterer struct { 68 contract *bind.BoundContract // Generic contract wrapper for the low level calls 69 } 70 71 // ERC20MockSession is an auto generated Go binding around an Ethereum contract, 72 // with pre-set call and transact options. 73 type ERC20MockSession struct { 74 Contract *ERC20Mock // Generic contract binding to set the session for 75 CallOpts bind.CallOpts // Call options to use throughout this session 76 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 77 } 78 79 // ERC20MockCallerSession is an auto generated read-only Go binding around an Ethereum contract, 80 // with pre-set call options. 81 type ERC20MockCallerSession struct { 82 Contract *ERC20MockCaller // Generic contract caller binding to set the session for 83 CallOpts bind.CallOpts // Call options to use throughout this session 84 } 85 86 // ERC20MockTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 87 // with pre-set transact options. 88 type ERC20MockTransactorSession struct { 89 Contract *ERC20MockTransactor // Generic contract transactor binding to set the session for 90 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 91 } 92 93 // ERC20MockRaw is an auto generated low-level Go binding around an Ethereum contract. 94 type ERC20MockRaw struct { 95 Contract *ERC20Mock // Generic contract binding to access the raw methods on 96 } 97 98 // ERC20MockCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 99 type ERC20MockCallerRaw struct { 100 Contract *ERC20MockCaller // Generic read-only contract binding to access the raw methods on 101 } 102 103 // ERC20MockTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 104 type ERC20MockTransactorRaw struct { 105 Contract *ERC20MockTransactor // Generic write-only contract binding to access the raw methods on 106 } 107 108 // NewERC20Mock creates a new instance of ERC20Mock, bound to a specific deployed contract. 109 func NewERC20Mock(address common.Address, backend bind.ContractBackend) (*ERC20Mock, error) { 110 contract, err := bindERC20Mock(address, backend, backend, backend) 111 if err != nil { 112 return nil, err 113 } 114 return &ERC20Mock{ERC20MockCaller: ERC20MockCaller{contract: contract}, ERC20MockTransactor: ERC20MockTransactor{contract: contract}, ERC20MockFilterer: ERC20MockFilterer{contract: contract}}, nil 115 } 116 117 // NewERC20MockCaller creates a new read-only instance of ERC20Mock, bound to a specific deployed contract. 118 func NewERC20MockCaller(address common.Address, caller bind.ContractCaller) (*ERC20MockCaller, error) { 119 contract, err := bindERC20Mock(address, caller, nil, nil) 120 if err != nil { 121 return nil, err 122 } 123 return &ERC20MockCaller{contract: contract}, nil 124 } 125 126 // NewERC20MockTransactor creates a new write-only instance of ERC20Mock, bound to a specific deployed contract. 127 func NewERC20MockTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20MockTransactor, error) { 128 contract, err := bindERC20Mock(address, nil, transactor, nil) 129 if err != nil { 130 return nil, err 131 } 132 return &ERC20MockTransactor{contract: contract}, nil 133 } 134 135 // NewERC20MockFilterer creates a new log filterer instance of ERC20Mock, bound to a specific deployed contract. 136 func NewERC20MockFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20MockFilterer, error) { 137 contract, err := bindERC20Mock(address, nil, nil, filterer) 138 if err != nil { 139 return nil, err 140 } 141 return &ERC20MockFilterer{contract: contract}, nil 142 } 143 144 // bindERC20Mock binds a generic wrapper to an already deployed contract. 145 func bindERC20Mock(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 146 parsed, err := abi.JSON(strings.NewReader(ERC20MockABI)) 147 if err != nil { 148 return nil, err 149 } 150 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 151 } 152 153 // Call invokes the (constant) contract method with params as input values and 154 // sets the output to result. The result type might be a single field for simple 155 // returns, a slice of interfaces for anonymous returns and a struct for named 156 // returns. 157 func (_ERC20Mock *ERC20MockRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 158 return _ERC20Mock.Contract.ERC20MockCaller.contract.Call(opts, result, method, params...) 159 } 160 161 // Transfer initiates a plain transaction to move funds to the contract, calling 162 // its default method if one is available. 163 func (_ERC20Mock *ERC20MockRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 164 return _ERC20Mock.Contract.ERC20MockTransactor.contract.Transfer(opts) 165 } 166 167 // Transact invokes the (paid) contract method with params as input values. 168 func (_ERC20Mock *ERC20MockRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 169 return _ERC20Mock.Contract.ERC20MockTransactor.contract.Transact(opts, method, params...) 170 } 171 172 // Call invokes the (constant) contract method with params as input values and 173 // sets the output to result. The result type might be a single field for simple 174 // returns, a slice of interfaces for anonymous returns and a struct for named 175 // returns. 176 func (_ERC20Mock *ERC20MockCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 177 return _ERC20Mock.Contract.contract.Call(opts, result, method, params...) 178 } 179 180 // Transfer initiates a plain transaction to move funds to the contract, calling 181 // its default method if one is available. 182 func (_ERC20Mock *ERC20MockTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 183 return _ERC20Mock.Contract.contract.Transfer(opts) 184 } 185 186 // Transact invokes the (paid) contract method with params as input values. 187 func (_ERC20Mock *ERC20MockTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 188 return _ERC20Mock.Contract.contract.Transact(opts, method, params...) 189 } 190 191 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 192 // 193 // Solidity: function allowance(address owner, address spender) view returns(uint256) 194 func (_ERC20Mock *ERC20MockCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { 195 var out []interface{} 196 err := _ERC20Mock.contract.Call(opts, &out, "allowance", owner, spender) 197 198 if err != nil { 199 return *new(*big.Int), err 200 } 201 202 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 203 204 return out0, err 205 206 } 207 208 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 209 // 210 // Solidity: function allowance(address owner, address spender) view returns(uint256) 211 func (_ERC20Mock *ERC20MockSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 212 return _ERC20Mock.Contract.Allowance(&_ERC20Mock.CallOpts, owner, spender) 213 } 214 215 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 216 // 217 // Solidity: function allowance(address owner, address spender) view returns(uint256) 218 func (_ERC20Mock *ERC20MockCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 219 return _ERC20Mock.Contract.Allowance(&_ERC20Mock.CallOpts, owner, spender) 220 } 221 222 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 223 // 224 // Solidity: function balanceOf(address owner) view returns(uint256) 225 func (_ERC20Mock *ERC20MockCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { 226 var out []interface{} 227 err := _ERC20Mock.contract.Call(opts, &out, "balanceOf", owner) 228 229 if err != nil { 230 return *new(*big.Int), err 231 } 232 233 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 234 235 return out0, err 236 237 } 238 239 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 240 // 241 // Solidity: function balanceOf(address owner) view returns(uint256) 242 func (_ERC20Mock *ERC20MockSession) BalanceOf(owner common.Address) (*big.Int, error) { 243 return _ERC20Mock.Contract.BalanceOf(&_ERC20Mock.CallOpts, owner) 244 } 245 246 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 247 // 248 // Solidity: function balanceOf(address owner) view returns(uint256) 249 func (_ERC20Mock *ERC20MockCallerSession) BalanceOf(owner common.Address) (*big.Int, error) { 250 return _ERC20Mock.Contract.BalanceOf(&_ERC20Mock.CallOpts, owner) 251 } 252 253 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 254 // 255 // Solidity: function totalSupply() view returns(uint256) 256 func (_ERC20Mock *ERC20MockCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 257 var out []interface{} 258 err := _ERC20Mock.contract.Call(opts, &out, "totalSupply") 259 260 if err != nil { 261 return *new(*big.Int), err 262 } 263 264 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 265 266 return out0, err 267 268 } 269 270 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 271 // 272 // Solidity: function totalSupply() view returns(uint256) 273 func (_ERC20Mock *ERC20MockSession) TotalSupply() (*big.Int, error) { 274 return _ERC20Mock.Contract.TotalSupply(&_ERC20Mock.CallOpts) 275 } 276 277 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 278 // 279 // Solidity: function totalSupply() view returns(uint256) 280 func (_ERC20Mock *ERC20MockCallerSession) TotalSupply() (*big.Int, error) { 281 return _ERC20Mock.Contract.TotalSupply(&_ERC20Mock.CallOpts) 282 } 283 284 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 285 // 286 // Solidity: function approve(address spender, uint256 value) returns(bool) 287 func (_ERC20Mock *ERC20MockTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { 288 return _ERC20Mock.contract.Transact(opts, "approve", spender, value) 289 } 290 291 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 292 // 293 // Solidity: function approve(address spender, uint256 value) returns(bool) 294 func (_ERC20Mock *ERC20MockSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 295 return _ERC20Mock.Contract.Approve(&_ERC20Mock.TransactOpts, spender, value) 296 } 297 298 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 299 // 300 // Solidity: function approve(address spender, uint256 value) returns(bool) 301 func (_ERC20Mock *ERC20MockTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 302 return _ERC20Mock.Contract.Approve(&_ERC20Mock.TransactOpts, spender, value) 303 } 304 305 // BatchTransfer is a paid mutator transaction binding the contract method 0x2e72102f. 306 // 307 // Solidity: function batchTransfer(address[] _tokens, address _to, uint256[] _amounts) returns() 308 func (_ERC20Mock *ERC20MockTransactor) BatchTransfer(opts *bind.TransactOpts, _tokens []common.Address, _to common.Address, _amounts []*big.Int) (*types.Transaction, error) { 309 return _ERC20Mock.contract.Transact(opts, "batchTransfer", _tokens, _to, _amounts) 310 } 311 312 // BatchTransfer is a paid mutator transaction binding the contract method 0x2e72102f. 313 // 314 // Solidity: function batchTransfer(address[] _tokens, address _to, uint256[] _amounts) returns() 315 func (_ERC20Mock *ERC20MockSession) BatchTransfer(_tokens []common.Address, _to common.Address, _amounts []*big.Int) (*types.Transaction, error) { 316 return _ERC20Mock.Contract.BatchTransfer(&_ERC20Mock.TransactOpts, _tokens, _to, _amounts) 317 } 318 319 // BatchTransfer is a paid mutator transaction binding the contract method 0x2e72102f. 320 // 321 // Solidity: function batchTransfer(address[] _tokens, address _to, uint256[] _amounts) returns() 322 func (_ERC20Mock *ERC20MockTransactorSession) BatchTransfer(_tokens []common.Address, _to common.Address, _amounts []*big.Int) (*types.Transaction, error) { 323 return _ERC20Mock.Contract.BatchTransfer(&_ERC20Mock.TransactOpts, _tokens, _to, _amounts) 324 } 325 326 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 327 // 328 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 329 func (_ERC20Mock *ERC20MockTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 330 return _ERC20Mock.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) 331 } 332 333 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 334 // 335 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 336 func (_ERC20Mock *ERC20MockSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 337 return _ERC20Mock.Contract.DecreaseAllowance(&_ERC20Mock.TransactOpts, spender, subtractedValue) 338 } 339 340 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 341 // 342 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 343 func (_ERC20Mock *ERC20MockTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 344 return _ERC20Mock.Contract.DecreaseAllowance(&_ERC20Mock.TransactOpts, spender, subtractedValue) 345 } 346 347 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 348 // 349 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 350 func (_ERC20Mock *ERC20MockTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 351 return _ERC20Mock.contract.Transact(opts, "increaseAllowance", spender, addedValue) 352 } 353 354 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 355 // 356 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 357 func (_ERC20Mock *ERC20MockSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 358 return _ERC20Mock.Contract.IncreaseAllowance(&_ERC20Mock.TransactOpts, spender, addedValue) 359 } 360 361 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 362 // 363 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 364 func (_ERC20Mock *ERC20MockTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 365 return _ERC20Mock.Contract.IncreaseAllowance(&_ERC20Mock.TransactOpts, spender, addedValue) 366 } 367 368 // MockMint is a paid mutator transaction binding the contract method 0x378934b4. 369 // 370 // Solidity: function mockMint(address _address, uint256 _amount) returns() 371 func (_ERC20Mock *ERC20MockTransactor) MockMint(opts *bind.TransactOpts, _address common.Address, _amount *big.Int) (*types.Transaction, error) { 372 return _ERC20Mock.contract.Transact(opts, "mockMint", _address, _amount) 373 } 374 375 // MockMint is a paid mutator transaction binding the contract method 0x378934b4. 376 // 377 // Solidity: function mockMint(address _address, uint256 _amount) returns() 378 func (_ERC20Mock *ERC20MockSession) MockMint(_address common.Address, _amount *big.Int) (*types.Transaction, error) { 379 return _ERC20Mock.Contract.MockMint(&_ERC20Mock.TransactOpts, _address, _amount) 380 } 381 382 // MockMint is a paid mutator transaction binding the contract method 0x378934b4. 383 // 384 // Solidity: function mockMint(address _address, uint256 _amount) returns() 385 func (_ERC20Mock *ERC20MockTransactorSession) MockMint(_address common.Address, _amount *big.Int) (*types.Transaction, error) { 386 return _ERC20Mock.Contract.MockMint(&_ERC20Mock.TransactOpts, _address, _amount) 387 } 388 389 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 390 // 391 // Solidity: function transfer(address to, uint256 value) returns(bool) 392 func (_ERC20Mock *ERC20MockTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { 393 return _ERC20Mock.contract.Transact(opts, "transfer", to, value) 394 } 395 396 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 397 // 398 // Solidity: function transfer(address to, uint256 value) returns(bool) 399 func (_ERC20Mock *ERC20MockSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { 400 return _ERC20Mock.Contract.Transfer(&_ERC20Mock.TransactOpts, to, value) 401 } 402 403 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 404 // 405 // Solidity: function transfer(address to, uint256 value) returns(bool) 406 func (_ERC20Mock *ERC20MockTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { 407 return _ERC20Mock.Contract.Transfer(&_ERC20Mock.TransactOpts, to, value) 408 } 409 410 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 411 // 412 // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) 413 func (_ERC20Mock *ERC20MockTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { 414 return _ERC20Mock.contract.Transact(opts, "transferFrom", from, to, value) 415 } 416 417 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 418 // 419 // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) 420 func (_ERC20Mock *ERC20MockSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { 421 return _ERC20Mock.Contract.TransferFrom(&_ERC20Mock.TransactOpts, from, to, value) 422 } 423 424 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 425 // 426 // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) 427 func (_ERC20Mock *ERC20MockTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { 428 return _ERC20Mock.Contract.TransferFrom(&_ERC20Mock.TransactOpts, from, to, value) 429 } 430 431 // ERC20MockApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20Mock contract. 432 type ERC20MockApprovalIterator struct { 433 Event *ERC20MockApproval // Event containing the contract specifics and raw log 434 435 contract *bind.BoundContract // Generic contract to use for unpacking event data 436 event string // Event name to use for unpacking event data 437 438 logs chan types.Log // Log channel receiving the found contract events 439 sub ethereum.Subscription // Subscription for errors, completion and termination 440 done bool // Whether the subscription completed delivering logs 441 fail error // Occurred error to stop iteration 442 } 443 444 // Next advances the iterator to the subsequent event, returning whether there 445 // are any more events found. In case of a retrieval or parsing error, false is 446 // returned and Error() can be queried for the exact failure. 447 func (it *ERC20MockApprovalIterator) Next() bool { 448 // If the iterator failed, stop iterating 449 if it.fail != nil { 450 return false 451 } 452 // If the iterator completed, deliver directly whatever's available 453 if it.done { 454 select { 455 case log := <-it.logs: 456 it.Event = new(ERC20MockApproval) 457 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 458 it.fail = err 459 return false 460 } 461 it.Event.Raw = log 462 return true 463 464 default: 465 return false 466 } 467 } 468 // Iterator still in progress, wait for either a data or an error event 469 select { 470 case log := <-it.logs: 471 it.Event = new(ERC20MockApproval) 472 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 473 it.fail = err 474 return false 475 } 476 it.Event.Raw = log 477 return true 478 479 case err := <-it.sub.Err(): 480 it.done = true 481 it.fail = err 482 return it.Next() 483 } 484 } 485 486 // Error returns any retrieval or parsing error occurred during filtering. 487 func (it *ERC20MockApprovalIterator) Error() error { 488 return it.fail 489 } 490 491 // Close terminates the iteration process, releasing any pending underlying 492 // resources. 493 func (it *ERC20MockApprovalIterator) Close() error { 494 it.sub.Unsubscribe() 495 return nil 496 } 497 498 // ERC20MockApproval represents a Approval event raised by the ERC20Mock contract. 499 type ERC20MockApproval struct { 500 Owner common.Address 501 Spender common.Address 502 Value *big.Int 503 Raw types.Log // Blockchain specific contextual infos 504 } 505 506 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 507 // 508 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 509 func (_ERC20Mock *ERC20MockFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20MockApprovalIterator, error) { 510 511 var ownerRule []interface{} 512 for _, ownerItem := range owner { 513 ownerRule = append(ownerRule, ownerItem) 514 } 515 var spenderRule []interface{} 516 for _, spenderItem := range spender { 517 spenderRule = append(spenderRule, spenderItem) 518 } 519 520 logs, sub, err := _ERC20Mock.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 521 if err != nil { 522 return nil, err 523 } 524 return &ERC20MockApprovalIterator{contract: _ERC20Mock.contract, event: "Approval", logs: logs, sub: sub}, nil 525 } 526 527 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 528 // 529 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 530 func (_ERC20Mock *ERC20MockFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20MockApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 531 532 var ownerRule []interface{} 533 for _, ownerItem := range owner { 534 ownerRule = append(ownerRule, ownerItem) 535 } 536 var spenderRule []interface{} 537 for _, spenderItem := range spender { 538 spenderRule = append(spenderRule, spenderItem) 539 } 540 541 logs, sub, err := _ERC20Mock.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 542 if err != nil { 543 return nil, err 544 } 545 return event.NewSubscription(func(quit <-chan struct{}) error { 546 defer sub.Unsubscribe() 547 for { 548 select { 549 case log := <-logs: 550 // New log arrived, parse the event and forward to the user 551 event := new(ERC20MockApproval) 552 if err := _ERC20Mock.contract.UnpackLog(event, "Approval", log); err != nil { 553 return err 554 } 555 event.Raw = log 556 557 select { 558 case sink <- event: 559 case err := <-sub.Err(): 560 return err 561 case <-quit: 562 return nil 563 } 564 case err := <-sub.Err(): 565 return err 566 case <-quit: 567 return nil 568 } 569 } 570 }), nil 571 } 572 573 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 574 // 575 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 576 func (_ERC20Mock *ERC20MockFilterer) ParseApproval(log types.Log) (*ERC20MockApproval, error) { 577 event := new(ERC20MockApproval) 578 if err := _ERC20Mock.contract.UnpackLog(event, "Approval", log); err != nil { 579 return nil, err 580 } 581 event.Raw = log 582 return event, nil 583 } 584 585 // ERC20MockTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Mock contract. 586 type ERC20MockTransferIterator struct { 587 Event *ERC20MockTransfer // Event containing the contract specifics and raw log 588 589 contract *bind.BoundContract // Generic contract to use for unpacking event data 590 event string // Event name to use for unpacking event data 591 592 logs chan types.Log // Log channel receiving the found contract events 593 sub ethereum.Subscription // Subscription for errors, completion and termination 594 done bool // Whether the subscription completed delivering logs 595 fail error // Occurred error to stop iteration 596 } 597 598 // Next advances the iterator to the subsequent event, returning whether there 599 // are any more events found. In case of a retrieval or parsing error, false is 600 // returned and Error() can be queried for the exact failure. 601 func (it *ERC20MockTransferIterator) Next() bool { 602 // If the iterator failed, stop iterating 603 if it.fail != nil { 604 return false 605 } 606 // If the iterator completed, deliver directly whatever's available 607 if it.done { 608 select { 609 case log := <-it.logs: 610 it.Event = new(ERC20MockTransfer) 611 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 612 it.fail = err 613 return false 614 } 615 it.Event.Raw = log 616 return true 617 618 default: 619 return false 620 } 621 } 622 // Iterator still in progress, wait for either a data or an error event 623 select { 624 case log := <-it.logs: 625 it.Event = new(ERC20MockTransfer) 626 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 627 it.fail = err 628 return false 629 } 630 it.Event.Raw = log 631 return true 632 633 case err := <-it.sub.Err(): 634 it.done = true 635 it.fail = err 636 return it.Next() 637 } 638 } 639 640 // Error returns any retrieval or parsing error occurred during filtering. 641 func (it *ERC20MockTransferIterator) Error() error { 642 return it.fail 643 } 644 645 // Close terminates the iteration process, releasing any pending underlying 646 // resources. 647 func (it *ERC20MockTransferIterator) Close() error { 648 it.sub.Unsubscribe() 649 return nil 650 } 651 652 // ERC20MockTransfer represents a Transfer event raised by the ERC20Mock contract. 653 type ERC20MockTransfer struct { 654 From common.Address 655 To common.Address 656 Value *big.Int 657 Raw types.Log // Blockchain specific contextual infos 658 } 659 660 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 661 // 662 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 663 func (_ERC20Mock *ERC20MockFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20MockTransferIterator, error) { 664 665 var fromRule []interface{} 666 for _, fromItem := range from { 667 fromRule = append(fromRule, fromItem) 668 } 669 var toRule []interface{} 670 for _, toItem := range to { 671 toRule = append(toRule, toItem) 672 } 673 674 logs, sub, err := _ERC20Mock.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 675 if err != nil { 676 return nil, err 677 } 678 return &ERC20MockTransferIterator{contract: _ERC20Mock.contract, event: "Transfer", logs: logs, sub: sub}, nil 679 } 680 681 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 682 // 683 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 684 func (_ERC20Mock *ERC20MockFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20MockTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { 685 686 var fromRule []interface{} 687 for _, fromItem := range from { 688 fromRule = append(fromRule, fromItem) 689 } 690 var toRule []interface{} 691 for _, toItem := range to { 692 toRule = append(toRule, toItem) 693 } 694 695 logs, sub, err := _ERC20Mock.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 696 if err != nil { 697 return nil, err 698 } 699 return event.NewSubscription(func(quit <-chan struct{}) error { 700 defer sub.Unsubscribe() 701 for { 702 select { 703 case log := <-logs: 704 // New log arrived, parse the event and forward to the user 705 event := new(ERC20MockTransfer) 706 if err := _ERC20Mock.contract.UnpackLog(event, "Transfer", log); err != nil { 707 return err 708 } 709 event.Raw = log 710 711 select { 712 case sink <- event: 713 case err := <-sub.Err(): 714 return err 715 case <-quit: 716 return nil 717 } 718 case err := <-sub.Err(): 719 return err 720 case <-quit: 721 return nil 722 } 723 } 724 }), nil 725 } 726 727 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 728 // 729 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 730 func (_ERC20Mock *ERC20MockFilterer) ParseTransfer(log types.Log) (*ERC20MockTransfer, error) { 731 event := new(ERC20MockTransfer) 732 if err := _ERC20Mock.contract.UnpackLog(event, "Transfer", log); err != nil { 733 return nil, err 734 } 735 event.Raw = log 736 return event, nil 737 }