arnaucube
arnaucube/hermez-nodePublic Self-hosted repository
hermez-node/eth/contracts/erc20/erc20.go
eth/contracts/erc20/erc20.goRaw
  1// Code generated - DO NOT EDIT.
  2// This file is a generated binding and any manual changes will be lost.
  3
  4package erc20
  5
  6import (
  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.
 19var (
 20	_ = big.NewInt
 21	_ = strings.NewReader
 22	_ = ethereum.NotFound
 23	_ = bind.Bind
 24	_ = common.Big1
 25	_ = types.BloomLookup
 26	_ = event.NewSubscription
 27)
 28
 29// ERC20ABI is the input ABI used to generate the binding from.
 30const ERC20ABI = "[{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"
 31
 32// ERC20FuncSigs maps the 4-byte function signature to its string representation.
 33var ERC20FuncSigs = map[string]string{
 34	"313ce567": "decimals()",
 35	"06fdde03": "name()",
 36	"95d89b41": "symbol()",
 37}
 38
 39// ERC20Bin is the compiled bytecode used for deploying new contracts.
 40var ERC20Bin = "0x608060405234801561001057600080fd5b50610123806100206000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c806306fdde03146041578063313ce5671460b957806395d89b41146041575b600080fd5b604760d5565b6040805160208082528351818301528351919283929083019185019080838360005b83811015607f5781810151838201526020016069565b50505050905090810190601f16801560ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60bf60e8565b6040805160ff9092168252519081900360200190f35b6040518060200160405280600081525081565b60008156fea26469706673582212209717f9f3c7b4f090e7741b44c5cb9425a26b593410462c0f4c2c0c0879db648d64736f6c63430007010033"
 41
 42// DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it.
 43func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) {
 44	parsed, err := abi.JSON(strings.NewReader(ERC20ABI))
 45	if err != nil {
 46		return common.Address{}, nil, nil, err
 47	}
 48
 49	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20Bin), backend)
 50	if err != nil {
 51		return common.Address{}, nil, nil, err
 52	}
 53	return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil
 54}
 55
 56// ERC20 is an auto generated Go binding around an Ethereum contract.
 57type ERC20 struct {
 58	ERC20Caller     // Read-only binding to the contract
 59	ERC20Transactor // Write-only binding to the contract
 60	ERC20Filterer   // Log filterer for contract events
 61}
 62
 63// ERC20Caller is an auto generated read-only Go binding around an Ethereum contract.
 64type ERC20Caller struct {
 65	contract *bind.BoundContract // Generic contract wrapper for the low level calls
 66}
 67
 68// ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract.
 69type ERC20Transactor struct {
 70	contract *bind.BoundContract // Generic contract wrapper for the low level calls
 71}
 72
 73// ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
 74type ERC20Filterer struct {
 75	contract *bind.BoundContract // Generic contract wrapper for the low level calls
 76}
 77
 78// ERC20Session is an auto generated Go binding around an Ethereum contract,
 79// with pre-set call and transact options.
 80type ERC20Session struct {
 81	Contract     *ERC20            // Generic contract binding to set the session for
 82	CallOpts     bind.CallOpts     // Call options to use throughout this session
 83	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
 84}
 85
 86// ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract,
 87// with pre-set call options.
 88type ERC20CallerSession struct {
 89	Contract *ERC20Caller  // Generic contract caller binding to set the session for
 90	CallOpts bind.CallOpts // Call options to use throughout this session
 91}
 92
 93// ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
 94// with pre-set transact options.
 95type ERC20TransactorSession struct {
 96	Contract     *ERC20Transactor  // Generic contract transactor binding to set the session for
 97	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
 98}
 99
100// ERC20Raw is an auto generated low-level Go binding around an Ethereum contract.
101type ERC20Raw struct {
102	Contract *ERC20 // Generic contract binding to access the raw methods on
103}
104
105// ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
106type ERC20CallerRaw struct {
107	Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on
108}
109
110// ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
111type ERC20TransactorRaw struct {
112	Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on
113}
114
115// NewERC20 creates a new instance of ERC20, bound to a specific deployed contract.
116func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) {
117	contract, err := bindERC20(address, backend, backend, backend)
118	if err != nil {
119		return nil, err
120	}
121	return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil
122}
123
124// NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract.
125func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) {
126	contract, err := bindERC20(address, caller, nil, nil)
127	if err != nil {
128		return nil, err
129	}
130	return &ERC20Caller{contract: contract}, nil
131}
132
133// NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract.
134func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) {
135	contract, err := bindERC20(address, nil, transactor, nil)
136	if err != nil {
137		return nil, err
138	}
139	return &ERC20Transactor{contract: contract}, nil
140}
141
142// NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract.
143func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) {
144	contract, err := bindERC20(address, nil, nil, filterer)
145	if err != nil {
146		return nil, err
147	}
148	return &ERC20Filterer{contract: contract}, nil
149}
150
151// bindERC20 binds a generic wrapper to an already deployed contract.
152func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
153	parsed, err := abi.JSON(strings.NewReader(ERC20ABI))
154	if err != nil {
155		return nil, err
156	}
157	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
158}
159
160// Call invokes the (constant) contract method with params as input values and
161// sets the output to result. The result type might be a single field for simple
162// returns, a slice of interfaces for anonymous returns and a struct for named
163// returns.
164func (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
165	return _ERC20.Contract.ERC20Caller.contract.Call(opts, result, method, params...)
166}
167
168// Transfer initiates a plain transaction to move funds to the contract, calling
169// its default method if one is available.
170func (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
171	return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts)
172}
173
174// Transact invokes the (paid) contract method with params as input values.
175func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
176	return _ERC20.Contract.ERC20Transactor.contract.Transact(opts, method, params...)
177}
178
179// Call invokes the (constant) contract method with params as input values and
180// sets the output to result. The result type might be a single field for simple
181// returns, a slice of interfaces for anonymous returns and a struct for named
182// returns.
183func (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
184	return _ERC20.Contract.contract.Call(opts, result, method, params...)
185}
186
187// Transfer initiates a plain transaction to move funds to the contract, calling
188// its default method if one is available.
189func (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
190	return _ERC20.Contract.contract.Transfer(opts)
191}
192
193// Transact invokes the (paid) contract method with params as input values.
194func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
195	return _ERC20.Contract.contract.Transact(opts, method, params...)
196}
197
198// Decimals is a free data retrieval call binding the contract method 0x313ce567.
199//
200// Solidity: function decimals() view returns(uint8)
201func (_ERC20 *ERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) {
202	var (
203		ret0 = new(uint8)
204	)
205	out := ret0
206	err := _ERC20.contract.Call(opts, out, "decimals")
207	return *ret0, err
208}
209
210// Decimals is a free data retrieval call binding the contract method 0x313ce567.
211//
212// Solidity: function decimals() view returns(uint8)
213func (_ERC20 *ERC20Session) Decimals() (uint8, error) {
214	return _ERC20.Contract.Decimals(&_ERC20.CallOpts)
215}
216
217// Decimals is a free data retrieval call binding the contract method 0x313ce567.
218//
219// Solidity: function decimals() view returns(uint8)
220func (_ERC20 *ERC20CallerSession) Decimals() (uint8, error) {
221	return _ERC20.Contract.Decimals(&_ERC20.CallOpts)
222}
223
224// Name is a free data retrieval call binding the contract method 0x06fdde03.
225//
226// Solidity: function name() view returns(string)
227func (_ERC20 *ERC20Caller) Name(opts *bind.CallOpts) (string, error) {
228	var (
229		ret0 = new(string)
230	)
231	out := ret0
232	err := _ERC20.contract.Call(opts, out, "name")
233	return *ret0, err
234}
235
236// Name is a free data retrieval call binding the contract method 0x06fdde03.
237//
238// Solidity: function name() view returns(string)
239func (_ERC20 *ERC20Session) Name() (string, error) {
240	return _ERC20.Contract.Name(&_ERC20.CallOpts)
241}
242
243// Name is a free data retrieval call binding the contract method 0x06fdde03.
244//
245// Solidity: function name() view returns(string)
246func (_ERC20 *ERC20CallerSession) Name() (string, error) {
247	return _ERC20.Contract.Name(&_ERC20.CallOpts)
248}
249
250// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
251//
252// Solidity: function symbol() view returns(string)
253func (_ERC20 *ERC20Caller) Symbol(opts *bind.CallOpts) (string, error) {
254	var (
255		ret0 = new(string)
256	)
257	out := ret0
258	err := _ERC20.contract.Call(opts, out, "symbol")
259	return *ret0, err
260}
261
262// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
263//
264// Solidity: function symbol() view returns(string)
265func (_ERC20 *ERC20Session) Symbol() (string, error) {
266	return _ERC20.Contract.Symbol(&_ERC20.CallOpts)
267}
268
269// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
270//
271// Solidity: function symbol() view returns(string)
272func (_ERC20 *ERC20CallerSession) Symbol() (string, error) {
273	return _ERC20.Contract.Symbol(&_ERC20.CallOpts)
274}