erc20

package
v0.0.0-...-939e28a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Erc20ABI = Erc20MetaData.ABI

Erc20ABI is the input ABI used to generate the binding from. Deprecated: Use Erc20MetaData.ABI instead.

View Source
var Erc20MetaData = &bind.MetaData{
	ABI: "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"spentAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"inputs\":[{\"name\":\"initialSupply\",\"type\":\"uint256\"},{\"name\":\"tokenName\",\"type\":\"string\"},{\"name\":\"decimalUnits\",\"type\":\"uint8\"},{\"name\":\"tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]",
}

Erc20MetaData contains all meta data concerning the Erc20 contract.

Functions

This section is empty.

Types

type Erc20

type Erc20 struct {
	Erc20Caller     // Read-only binding to the contract
	Erc20Transactor // Write-only binding to the contract
	Erc20Filterer   // Log filterer for contract events
}

Erc20 is an auto generated Go binding around an Ethereum contract.

func NewErc20

func NewErc20(address common.Address, backend bind.ContractBackend) (*Erc20, error)

NewErc20 creates a new instance of Erc20, bound to a specific deployed contract.

type Erc20Caller

type Erc20Caller struct {
	// contains filtered or unexported fields
}

Erc20Caller is an auto generated read-only Go binding around an Ethereum contract.

func NewErc20Caller

func NewErc20Caller(address common.Address, caller bind.ContractCaller) (*Erc20Caller, error)

NewErc20Caller creates a new read-only instance of Erc20, bound to a specific deployed contract.

func (*Erc20Caller) Allowance

func (_Erc20 *Erc20Caller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address , address ) returns(uint256)

func (*Erc20Caller) BalanceOf

func (_Erc20 *Erc20Caller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address ) returns(uint256)

func (*Erc20Caller) Decimals

func (_Erc20 *Erc20Caller) Decimals(opts *bind.CallOpts) (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() returns(uint8)

func (*Erc20Caller) Name

func (_Erc20 *Erc20Caller) Name(opts *bind.CallOpts) (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() returns(string)

func (*Erc20Caller) SpentAllowance

func (_Erc20 *Erc20Caller) SpentAllowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error)

SpentAllowance is a free data retrieval call binding the contract method 0xdc3080f2.

Solidity: function spentAllowance(address , address ) returns(uint256)

func (*Erc20Caller) Symbol

func (_Erc20 *Erc20Caller) Symbol(opts *bind.CallOpts) (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() returns(string)

type Erc20CallerRaw

type Erc20CallerRaw struct {
	Contract *Erc20Caller // Generic read-only contract binding to access the raw methods on
}

Erc20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*Erc20CallerRaw) Call

func (_Erc20 *Erc20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type Erc20CallerSession

type Erc20CallerSession struct {
	Contract *Erc20Caller  // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

Erc20CallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*Erc20CallerSession) Allowance

func (_Erc20 *Erc20CallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address , address ) returns(uint256)

func (*Erc20CallerSession) BalanceOf

func (_Erc20 *Erc20CallerSession) BalanceOf(arg0 common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address ) returns(uint256)

func (*Erc20CallerSession) Decimals

func (_Erc20 *Erc20CallerSession) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() returns(uint8)

func (*Erc20CallerSession) Name

func (_Erc20 *Erc20CallerSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() returns(string)

func (*Erc20CallerSession) SpentAllowance

func (_Erc20 *Erc20CallerSession) SpentAllowance(arg0 common.Address, arg1 common.Address) (*big.Int, error)

SpentAllowance is a free data retrieval call binding the contract method 0xdc3080f2.

Solidity: function spentAllowance(address , address ) returns(uint256)

func (*Erc20CallerSession) Symbol

func (_Erc20 *Erc20CallerSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() returns(string)

type Erc20Filterer

type Erc20Filterer struct {
	// contains filtered or unexported fields
}

Erc20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewErc20Filterer

func NewErc20Filterer(address common.Address, filterer bind.ContractFilterer) (*Erc20Filterer, error)

NewErc20Filterer creates a new log filterer instance of Erc20, bound to a specific deployed contract.

func (*Erc20Filterer) FilterTransfer

func (_Erc20 *Erc20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*Erc20TransferIterator, error)

FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

func (*Erc20Filterer) ParseTransfer

func (_Erc20 *Erc20Filterer) ParseTransfer(log types.Log) (*Erc20Transfer, error)

ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

func (*Erc20Filterer) WatchTransfer

func (_Erc20 *Erc20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *Erc20Transfer, from []common.Address, to []common.Address) (event.Subscription, error)

WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

type Erc20Raw

type Erc20Raw struct {
	Contract *Erc20 // Generic contract binding to access the raw methods on
}

Erc20Raw is an auto generated low-level Go binding around an Ethereum contract.

func (*Erc20Raw) Call

func (_Erc20 *Erc20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*Erc20Raw) Transact

func (_Erc20 *Erc20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*Erc20Raw) Transfer

func (_Erc20 *Erc20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type Erc20Session

type Erc20Session struct {
	Contract     *Erc20            // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

Erc20Session is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*Erc20Session) Allowance

func (_Erc20 *Erc20Session) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address , address ) returns(uint256)

func (*Erc20Session) ApproveAndCall

func (_Erc20 *Erc20Session) ApproveAndCall(_spender common.Address, _value *big.Int, _extraData []byte) (*types.Transaction, error)

ApproveAndCall is a paid mutator transaction binding the contract method 0xcae9ca51.

Solidity: function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns(bool success)

func (*Erc20Session) BalanceOf

func (_Erc20 *Erc20Session) BalanceOf(arg0 common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address ) returns(uint256)

func (*Erc20Session) Decimals

func (_Erc20 *Erc20Session) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() returns(uint8)

func (*Erc20Session) Name

func (_Erc20 *Erc20Session) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() returns(string)

func (*Erc20Session) SpentAllowance

func (_Erc20 *Erc20Session) SpentAllowance(arg0 common.Address, arg1 common.Address) (*big.Int, error)

SpentAllowance is a free data retrieval call binding the contract method 0xdc3080f2.

Solidity: function spentAllowance(address , address ) returns(uint256)

func (*Erc20Session) Symbol

func (_Erc20 *Erc20Session) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() returns(string)

func (*Erc20Session) Transfer

func (_Erc20 *Erc20Session) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address _to, uint256 _value) returns()

func (*Erc20Session) TransferFrom

func (_Erc20 *Erc20Session) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success)

type Erc20Transactor

type Erc20Transactor struct {
	// contains filtered or unexported fields
}

Erc20Transactor is an auto generated write-only Go binding around an Ethereum contract.

func NewErc20Transactor

func NewErc20Transactor(address common.Address, transactor bind.ContractTransactor) (*Erc20Transactor, error)

NewErc20Transactor creates a new write-only instance of Erc20, bound to a specific deployed contract.

func (*Erc20Transactor) ApproveAndCall

func (_Erc20 *Erc20Transactor) ApproveAndCall(opts *bind.TransactOpts, _spender common.Address, _value *big.Int, _extraData []byte) (*types.Transaction, error)

ApproveAndCall is a paid mutator transaction binding the contract method 0xcae9ca51.

Solidity: function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns(bool success)

func (*Erc20Transactor) Transfer

func (_Erc20 *Erc20Transactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address _to, uint256 _value) returns()

func (*Erc20Transactor) TransferFrom

func (_Erc20 *Erc20Transactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success)

type Erc20TransactorRaw

type Erc20TransactorRaw struct {
	Contract *Erc20Transactor // Generic write-only contract binding to access the raw methods on
}

Erc20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*Erc20TransactorRaw) Transact

func (_Erc20 *Erc20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*Erc20TransactorRaw) Transfer

func (_Erc20 *Erc20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type Erc20TransactorSession

type Erc20TransactorSession struct {
	Contract     *Erc20Transactor  // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

Erc20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*Erc20TransactorSession) ApproveAndCall

func (_Erc20 *Erc20TransactorSession) ApproveAndCall(_spender common.Address, _value *big.Int, _extraData []byte) (*types.Transaction, error)

ApproveAndCall is a paid mutator transaction binding the contract method 0xcae9ca51.

Solidity: function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns(bool success)

func (*Erc20TransactorSession) Transfer

func (_Erc20 *Erc20TransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address _to, uint256 _value) returns()

func (*Erc20TransactorSession) TransferFrom

func (_Erc20 *Erc20TransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success)

type Erc20Transfer

type Erc20Transfer struct {
	From  common.Address
	To    common.Address
	Value *big.Int
	Raw   types.Log // Blockchain specific contextual infos
}

Erc20Transfer represents a Transfer event raised by the Erc20 contract.

type Erc20TransferIterator

type Erc20TransferIterator struct {
	Event *Erc20Transfer // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

Erc20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Erc20 contract.

func (*Erc20TransferIterator) Close

func (it *Erc20TransferIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*Erc20TransferIterator) Error

func (it *Erc20TransferIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*Erc20TransferIterator) Next

func (it *Erc20TransferIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL