chain

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 19 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 ERC20Bin = ERC20MetaData.Bin

ERC20Bin is the compiled bytecode used for deploying new contracts. Deprecated: Use ERC20MetaData.Bin instead.

View Source
var ERC20MetaData = &bind.MetaData{
	ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DECIMALS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"INITIAL_SUPPLY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decimals\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"name\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"symbol\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ERC20InsufficientAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"allowance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"needed\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ERC20InsufficientBalance\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"needed\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ERC20InvalidApprover\",\"inputs\":[{\"name\":\"approver\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC20InvalidReceiver\",\"inputs\":[{\"name\":\"receiver\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC20InvalidSender\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC20InvalidSpender\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}]}]",
	Bin: "0x608060405234801561000f575f5ffd5b506040518060400160405280601181526020017022a921991822bc30b6b83632aa37b5b2b760791b81525060405180604001604052806005815260200164045455432360dc1b81525081600390816100679190610293565b5060046100748282610293565b505050610093336b204fce5e3e2502611000000061009860201b60201c565b610372565b6001600160a01b0382166100c65760405163ec442f0560e01b81525f60048201526024015b60405180910390fd5b6100d15f83836100d5565b5050565b6001600160a01b0383166100ff578060025f8282546100f4919061034d565b9091555061016f9050565b6001600160a01b0383165f90815260208190526040902054818110156101515760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016100bd565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661018b576002805482900390556101a9565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516101ee91815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061022357607f821691505b60208210810361024157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561028e57805f5260205f20601f840160051c8101602085101561026c5750805b601f840160051c820191505b8181101561028b575f8155600101610278565b50505b505050565b81516001600160401b038111156102ac576102ac6101fb565b6102c0816102ba845461020f565b84610247565b6020601f8211600181146102f2575f83156102db5750848201515b5f19600385901b1c1916600184901b17845561028b565b5f84815260208120601f198516915b828110156103215787850151825560209485019460019092019101610301565b508482101561033e57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8082018082111561036c57634e487b7160e01b5f52601160045260245ffd5b92915050565b61071f8061037f5f395ff3fe608060405234801561000f575f5ffd5b50600436106100a6575f3560e01c80632ff2e9dc1161006e5780632ff2e9dc1461012a578063313ce5671461013d57806370a082311461014457806395d89b411461016c578063a9059cbb14610174578063dd62ed3e14610187575f5ffd5b806306fdde03146100aa578063095ea7b3146100c857806318160ddd146100eb57806323b872dd146100fd5780632e0f262514610110575b5f5ffd5b6100b26101bf565b6040516100bf919061058f565b60405180910390f35b6100db6100d63660046105df565b61024f565b60405190151581526020016100bf565b6002545b6040519081526020016100bf565b6100db61010b366004610607565b610268565b610118601281565b60405160ff90911681526020016100bf565b6100ef6b204fce5e3e2502611000000081565b6012610118565b6100ef610152366004610641565b6001600160a01b03165f9081526020819052604090205490565b6100b261028b565b6100db6101823660046105df565b61029a565b6100ef610195366004610661565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6060600380546101ce90610692565b80601f01602080910402602001604051908101604052809291908181526020018280546101fa90610692565b80156102455780601f1061021c57610100808354040283529160200191610245565b820191905f5260205f20905b81548152906001019060200180831161022857829003601f168201915b5050505050905090565b5f3361025c8185856102a7565b60019150505b92915050565b5f336102758582856102b9565b61028085858561033a565b506001949350505050565b6060600480546101ce90610692565b5f3361025c81858561033a565b6102b48383836001610397565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811015610334578181101561032657604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61033484848484035f610397565b50505050565b6001600160a01b03831661036357604051634b637e8f60e11b81525f600482015260240161031d565b6001600160a01b03821661038c5760405163ec442f0560e01b81525f600482015260240161031d565b6102b4838383610469565b6001600160a01b0384166103c05760405163e602df0560e01b81525f600482015260240161031d565b6001600160a01b0383166103e957604051634a1406b160e11b81525f600482015260240161031d565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561033457826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161045b91815260200190565b60405180910390a350505050565b6001600160a01b038316610493578060025f82825461048891906106ca565b909155506105039050565b6001600160a01b0383165f90815260208190526040902054818110156104e55760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640161031d565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661051f5760028054829003905561053d565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161058291815260200190565b60405180910390a3505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b03811681146105da575f5ffd5b919050565b5f5f604083850312156105f0575f5ffd5b6105f9836105c4565b946020939093013593505050565b5f5f5f60608486031215610619575f5ffd5b610622846105c4565b9250610630602085016105c4565b929592945050506040919091013590565b5f60208284031215610651575f5ffd5b61065a826105c4565b9392505050565b5f5f60408385031215610672575f5ffd5b61067b836105c4565b9150610689602084016105c4565b90509250929050565b600181811c908216806106a657607f821691505b6020821081036106c457634e487b7160e01b5f52602260045260245ffd5b50919050565b8082018082111561026257634e487b7160e01b5f52601160045260245ffdfea26469706673582212206a6cc07e76149b82a796c875f3f4a170d0243e12d896731fcdcb78cab4ad7b1a64736f6c634300081e0033",
}

ERC20MetaData contains all meta data concerning the ERC20 contract.

View Source
var File_chain_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BlockNumber

type BlockNumber interface {
	GetCurrentBlockNumber() (*big.Int, error)
}

type BoundContract

type BoundContract struct {
	*bind.BoundContract
	// contains filtered or unexported fields
}

BoundContract is a binding object for Ethereum smart contract It contains *bind.BoundContract (in go-ethereum) as an embedding

func NewBoundContract

func NewBoundContract(
	conn *ethclient.Client,
	addr ctype.Addr,
	rawABI string) (*BoundContract, error)

NewBoundContract creates a new contract binding

func (*BoundContract) CallFunc

func (c *BoundContract) CallFunc(
	result interface{},
	method string,
	params ...interface{}) error

CallFunc invokes a view-only 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 (*BoundContract) FilterEvent

func (c *BoundContract) FilterEvent(
	name string,
	opts *bind.FilterOpts,
	event interface{}) (*EventIterator, error)

FilterEvent gets historical events This function returns an iterator over historical events

func (*BoundContract) GetABI

func (c *BoundContract) GetABI() string

GetABI returns contract abi

func (*BoundContract) GetAddr

func (c *BoundContract) GetAddr() ctype.Addr

GetAddr returns contract addr

func (*BoundContract) GetETHClient

func (c *BoundContract) GetETHClient() *ethclient.Client

GetETHClient return ethereum client

func (*BoundContract) ParseEvent

func (c *BoundContract) ParseEvent(
	name string,
	log ethtypes.Log,
	event interface{}) error

ParseEvent parses the catched event according to the event template

func (*BoundContract) SendTransaction

func (c *BoundContract) SendTransaction(
	auth *bind.TransactOpts,
	method string,
	params ...interface{}) (*ethtypes.Transaction, error)

SendTransaction sends transactions to smart contract via bound contract

func (*BoundContract) WatchEvent

func (c *BoundContract) WatchEvent(
	name string,
	opts *bind.WatchOpts,
	done <-chan bool) (ethtypes.Log, error)

WatchEvent subscribes to future events This function blocks until an event is catched or done signal is received

type ChannelMigrationRequest

type ChannelMigrationRequest struct {

	// serialized entity.ChannelMigrationInfo message
	ChannelMigrationInfo []byte `protobuf:"bytes,1,opt,name=channel_migration_info,json=channelMigrationInfo,proto3" json:"channel_migration_info,omitempty"`
	// require an ascending order based on addresses associated with these sigs
	Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"`
	// contains filtered or unexported fields
}

Next Tag: 3

func (*ChannelMigrationRequest) Descriptor deprecated

func (*ChannelMigrationRequest) Descriptor() ([]byte, []int)

Deprecated: Use ChannelMigrationRequest.ProtoReflect.Descriptor instead.

func (*ChannelMigrationRequest) GetChannelMigrationInfo

func (x *ChannelMigrationRequest) GetChannelMigrationInfo() []byte

func (*ChannelMigrationRequest) GetSigs

func (x *ChannelMigrationRequest) GetSigs() [][]byte

func (*ChannelMigrationRequest) ProtoMessage

func (*ChannelMigrationRequest) ProtoMessage()

func (*ChannelMigrationRequest) ProtoReflect added in v1.1.0

func (x *ChannelMigrationRequest) ProtoReflect() protoreflect.Message

func (*ChannelMigrationRequest) Reset

func (x *ChannelMigrationRequest) Reset()

func (*ChannelMigrationRequest) String

func (x *ChannelMigrationRequest) String() string

type Contract

type Contract interface {
	GetAddr() ctype.Addr
	GetABI() string
	GetETHClient() *ethclient.Client
	SendTransaction(*bind.TransactOpts, string, ...interface{}) (*ethtypes.Transaction, error)
	CallFunc(interface{}, string, ...interface{}) error
	WatchEvent(string, *bind.WatchOpts, <-chan bool) (ethtypes.Log, error)
	FilterEvent(string, *bind.FilterOpts, interface{}) (*EventIterator, error)
	ParseEvent(string, ethtypes.Log, interface{}) error
}

Contract is the generic interface used by BoundContract and mock contracts in unit tests.

type CooperativeSettleRequest

type CooperativeSettleRequest struct {

	// serialized entity.CooperativeSettleInfo message
	SettleInfo []byte `protobuf:"bytes,1,opt,name=settle_info,json=settleInfo,proto3" json:"settle_info,omitempty"`
	// require an ascending order based on addresses associated with these sigs
	Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"`
	// contains filtered or unexported fields
}

Next Tag: 3

func (*CooperativeSettleRequest) Descriptor deprecated

func (*CooperativeSettleRequest) Descriptor() ([]byte, []int)

Deprecated: Use CooperativeSettleRequest.ProtoReflect.Descriptor instead.

func (*CooperativeSettleRequest) GetSettleInfo

func (x *CooperativeSettleRequest) GetSettleInfo() []byte

func (*CooperativeSettleRequest) GetSigs

func (x *CooperativeSettleRequest) GetSigs() [][]byte

func (*CooperativeSettleRequest) ProtoMessage

func (*CooperativeSettleRequest) ProtoMessage()

func (*CooperativeSettleRequest) ProtoReflect added in v1.1.0

func (x *CooperativeSettleRequest) ProtoReflect() protoreflect.Message

func (*CooperativeSettleRequest) Reset

func (x *CooperativeSettleRequest) Reset()

func (*CooperativeSettleRequest) String

func (x *CooperativeSettleRequest) String() string

type CooperativeWithdrawRequest

type CooperativeWithdrawRequest struct {

	// serialized entity.CooperativeWithdrawInfo message
	WithdrawInfo []byte `protobuf:"bytes,1,opt,name=withdraw_info,json=withdrawInfo,proto3" json:"withdraw_info,omitempty"`
	// require an ascending order based on addresses associated with these sigs
	Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"`
	// contains filtered or unexported fields
}

Next Tag: 3

func (*CooperativeWithdrawRequest) Descriptor deprecated

func (*CooperativeWithdrawRequest) Descriptor() ([]byte, []int)

Deprecated: Use CooperativeWithdrawRequest.ProtoReflect.Descriptor instead.

func (*CooperativeWithdrawRequest) GetSigs

func (x *CooperativeWithdrawRequest) GetSigs() [][]byte

func (*CooperativeWithdrawRequest) GetWithdrawInfo

func (x *CooperativeWithdrawRequest) GetWithdrawInfo() []byte

func (*CooperativeWithdrawRequest) ProtoMessage

func (*CooperativeWithdrawRequest) ProtoMessage()

func (*CooperativeWithdrawRequest) ProtoReflect added in v1.1.0

func (*CooperativeWithdrawRequest) Reset

func (x *CooperativeWithdrawRequest) Reset()

func (*CooperativeWithdrawRequest) String

func (x *CooperativeWithdrawRequest) String() string

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 DeployERC20

func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error)

DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it.

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 ERC20Approval

type ERC20Approval struct {
	Owner   common.Address
	Spender common.Address
	Value   *big.Int
	Raw     types.Log // Blockchain specific contextual infos
}

ERC20Approval represents a Approval event raised by the ERC20 contract.

type ERC20ApprovalIterator

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

ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract.

func (*ERC20ApprovalIterator) Close

func (it *ERC20ApprovalIterator) Close() error

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

func (*ERC20ApprovalIterator) Error

func (it *ERC20ApprovalIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*ERC20ApprovalIterator) Next

func (it *ERC20ApprovalIterator) 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.

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, owner common.Address, spender common.Address) (*big.Int, error)

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

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*ERC20Caller) BalanceOf

func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error)

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

Solidity: function balanceOf(address account) view returns(uint256)

func (*ERC20Caller) DECIMALS added in v1.1.0

func (_ERC20 *ERC20Caller) DECIMALS(opts *bind.CallOpts) (uint8, error)

DECIMALS is a free data retrieval call binding the contract method 0x2e0f2625.

Solidity: function DECIMALS() view returns(uint8)

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() view returns(uint8)

func (*ERC20Caller) INITIALSUPPLY added in v1.1.0

func (_ERC20 *ERC20Caller) INITIALSUPPLY(opts *bind.CallOpts) (*big.Int, error)

INITIALSUPPLY is a free data retrieval call binding the contract method 0x2ff2e9dc.

Solidity: function INITIAL_SUPPLY() view returns(uint256)

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() view returns(string)

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() view returns(string)

func (*ERC20Caller) TotalSupply

func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

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(owner common.Address, spender common.Address) (*big.Int, error)

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

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*ERC20CallerSession) BalanceOf

func (_ERC20 *ERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error)

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

Solidity: function balanceOf(address account) view returns(uint256)

func (*ERC20CallerSession) DECIMALS added in v1.1.0

func (_ERC20 *ERC20CallerSession) DECIMALS() (uint8, error)

DECIMALS is a free data retrieval call binding the contract method 0x2e0f2625.

Solidity: function DECIMALS() view returns(uint8)

func (*ERC20CallerSession) Decimals

func (_ERC20 *ERC20CallerSession) Decimals() (uint8, error)

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

Solidity: function decimals() view returns(uint8)

func (*ERC20CallerSession) INITIALSUPPLY added in v1.1.0

func (_ERC20 *ERC20CallerSession) INITIALSUPPLY() (*big.Int, error)

INITIALSUPPLY is a free data retrieval call binding the contract method 0x2ff2e9dc.

Solidity: function INITIAL_SUPPLY() view returns(uint256)

func (*ERC20CallerSession) Name

func (_ERC20 *ERC20CallerSession) Name() (string, error)

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

Solidity: function name() view returns(string)

func (*ERC20CallerSession) Symbol

func (_ERC20 *ERC20CallerSession) Symbol() (string, error)

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

Solidity: function symbol() view returns(string)

func (*ERC20CallerSession) TotalSupply

func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

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) FilterApproval

func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error)

FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)

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) ParseApproval added in v1.1.0

func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error)

ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)

func (*ERC20Filterer) ParseTransfer added in v1.1.0

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) WatchApproval

func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error)

WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, 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(owner common.Address, spender common.Address) (*big.Int, error)

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

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*ERC20Session) Approve

func (_ERC20 *ERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 value) returns(bool)

func (*ERC20Session) BalanceOf

func (_ERC20 *ERC20Session) BalanceOf(account common.Address) (*big.Int, error)

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

Solidity: function balanceOf(address account) view returns(uint256)

func (*ERC20Session) DECIMALS added in v1.1.0

func (_ERC20 *ERC20Session) DECIMALS() (uint8, error)

DECIMALS is a free data retrieval call binding the contract method 0x2e0f2625.

Solidity: function DECIMALS() view returns(uint8)

func (*ERC20Session) Decimals

func (_ERC20 *ERC20Session) Decimals() (uint8, error)

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

Solidity: function decimals() view returns(uint8)

func (*ERC20Session) INITIALSUPPLY added in v1.1.0

func (_ERC20 *ERC20Session) INITIALSUPPLY() (*big.Int, error)

INITIALSUPPLY is a free data retrieval call binding the contract method 0x2ff2e9dc.

Solidity: function INITIAL_SUPPLY() view returns(uint256)

func (*ERC20Session) Name

func (_ERC20 *ERC20Session) Name() (string, error)

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

Solidity: function name() view returns(string)

func (*ERC20Session) Symbol

func (_ERC20 *ERC20Session) Symbol() (string, error)

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

Solidity: function symbol() view returns(string)

func (*ERC20Session) TotalSupply

func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

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(bool)

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)

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) Approve

func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 value) returns(bool)

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(bool)

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)

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) Approve

func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 value) returns(bool)

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(bool)

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)

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.

type EventIterator

type EventIterator struct {
	Event    interface{}           // Event containing the contract specifics and raw log
	Contract *BoundContract        // Generic contract to use for unpacking event data
	Name     string                // Event name to use for unpacking event data
	Logs     chan ethtypes.Log     // Log channel receiving the found contract events
	Sub      ethereum.Subscription // Subscription for errors, completion and termination
	Done     bool                  // Whether the subscription completed delivering logs
	Fail     error                 // Occurred error to stop iteration
}

EventIterator is returned from FilterEvent and is used to iterate over the raw logs and unpacked data

func (*EventIterator) Close

func (it *EventIterator) Close() error

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

func (*EventIterator) Error

func (it *EventIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*EventIterator) Next

func (it *EventIterator) Next() (ethtypes.Log, 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.

type OpenChannelRequest

type OpenChannelRequest struct {

	// serialized entity.PaymentChannelInitializer message
	ChannelInitializer []byte `protobuf:"bytes,1,opt,name=channel_initializer,json=channelInitializer,proto3" json:"channel_initializer,omitempty"`
	// require an ascending order based on addresses associated with these sigs
	Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"`
	// contains filtered or unexported fields
}

Next Tag: 3

func (*OpenChannelRequest) Descriptor deprecated

func (*OpenChannelRequest) Descriptor() ([]byte, []int)

Deprecated: Use OpenChannelRequest.ProtoReflect.Descriptor instead.

func (*OpenChannelRequest) GetChannelInitializer

func (x *OpenChannelRequest) GetChannelInitializer() []byte

func (*OpenChannelRequest) GetSigs

func (x *OpenChannelRequest) GetSigs() [][]byte

func (*OpenChannelRequest) ProtoMessage

func (*OpenChannelRequest) ProtoMessage()

func (*OpenChannelRequest) ProtoReflect added in v1.1.0

func (x *OpenChannelRequest) ProtoReflect() protoreflect.Message

func (*OpenChannelRequest) Reset

func (x *OpenChannelRequest) Reset()

func (*OpenChannelRequest) String

func (x *OpenChannelRequest) String() string

type ResolvePayByConditionsRequest

type ResolvePayByConditionsRequest struct {

	// serialized entity.ConditionalPay message
	CondPay []byte `protobuf:"bytes,1,opt,name=cond_pay,json=condPay,proto3" json:"cond_pay,omitempty"`
	// preimages of the cond_pay hash locks in the same order
	HashPreimages [][]byte `protobuf:"bytes,2,rep,name=hash_preimages,json=hashPreimages,proto3" json:"hash_preimages,omitempty"`
	// contains filtered or unexported fields
}

Next Tag: 3

func (*ResolvePayByConditionsRequest) Descriptor deprecated

func (*ResolvePayByConditionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ResolvePayByConditionsRequest.ProtoReflect.Descriptor instead.

func (*ResolvePayByConditionsRequest) GetCondPay

func (x *ResolvePayByConditionsRequest) GetCondPay() []byte

func (*ResolvePayByConditionsRequest) GetHashPreimages

func (x *ResolvePayByConditionsRequest) GetHashPreimages() [][]byte

func (*ResolvePayByConditionsRequest) ProtoMessage

func (*ResolvePayByConditionsRequest) ProtoMessage()

func (*ResolvePayByConditionsRequest) ProtoReflect added in v1.1.0

func (*ResolvePayByConditionsRequest) Reset

func (x *ResolvePayByConditionsRequest) Reset()

func (*ResolvePayByConditionsRequest) String

type SignedSimplexState

type SignedSimplexState struct {

	// serialized entity.SimplexPaymentChannel message
	SimplexState []byte `protobuf:"bytes,1,opt,name=simplex_state,json=simplexState,proto3" json:"simplex_state,omitempty"`
	// require an ascending order based on addresses associated with these sigs
	Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"`
	// contains filtered or unexported fields
}

Next Tag: 3

func (*SignedSimplexState) Descriptor deprecated

func (*SignedSimplexState) Descriptor() ([]byte, []int)

Deprecated: Use SignedSimplexState.ProtoReflect.Descriptor instead.

func (*SignedSimplexState) GetSigs

func (x *SignedSimplexState) GetSigs() [][]byte

func (*SignedSimplexState) GetSimplexState

func (x *SignedSimplexState) GetSimplexState() []byte

func (*SignedSimplexState) ProtoMessage

func (*SignedSimplexState) ProtoMessage()

func (*SignedSimplexState) ProtoReflect added in v1.1.0

func (x *SignedSimplexState) ProtoReflect() protoreflect.Message

func (*SignedSimplexState) Reset

func (x *SignedSimplexState) Reset()

func (*SignedSimplexState) String

func (x *SignedSimplexState) String() string

type SignedSimplexStateArray

type SignedSimplexStateArray struct {
	SignedSimplexStates []*SignedSimplexState `protobuf:"bytes,1,rep,name=signed_simplex_states,json=signedSimplexStates,proto3" json:"signed_simplex_states,omitempty"`
	// contains filtered or unexported fields
}

Next Tag: 2 Using this message to intendSettle is flexible:

  • you can put multiple signed simplex states in one array as long as not exceeding gas limit
  • you can put signed simplex states of multiple channels in one array to intendSettle these channels in one function call

How to use:

  • channelIds of these simplex states must be ascending
  • non-null simplex states should be cosigned by both peers of the channel
  • null simplex states should set seqNum as 0 and be signed by exactly one of the peers of the channel

Note: if you are submitting one simplex state of the duplex channel,

you are intending to settle the whole duplex channel.

func (*SignedSimplexStateArray) Descriptor deprecated

func (*SignedSimplexStateArray) Descriptor() ([]byte, []int)

Deprecated: Use SignedSimplexStateArray.ProtoReflect.Descriptor instead.

func (*SignedSimplexStateArray) GetSignedSimplexStates

func (x *SignedSimplexStateArray) GetSignedSimplexStates() []*SignedSimplexState

func (*SignedSimplexStateArray) ProtoMessage

func (*SignedSimplexStateArray) ProtoMessage()

func (*SignedSimplexStateArray) ProtoReflect added in v1.1.0

func (x *SignedSimplexStateArray) ProtoReflect() protoreflect.Message

func (*SignedSimplexStateArray) Reset

func (x *SignedSimplexStateArray) Reset()

func (*SignedSimplexStateArray) String

func (x *SignedSimplexStateArray) String() string

Jump to

Keyboard shortcuts

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