Documentation
¶
Index ¶
- Variables
- type ApprovalEvent
- type ConstantMethod
- type Contract
- func (c *Contract) Call(ctx context.Context, methodName string, args ...any) ([]any, error)
- func (c *Contract) Clone() *Contract
- func (c *Contract) GetConstantMethod(methodName string) ConstantMethod
- func (c *Contract) GetEvents(tx *tx.Transaction) ([]Event, error)
- func (c *Contract) GetEventsByName(tx *tx.Transaction, eventName string) ([]Event, error)
- func (c *Contract) GetMethod(methodName string) Method
- func (c *Contract) GetResult(tx *tx.Transaction, methodName string) ([]any, error)
- func (c *Contract) LoadABI(abiJson []byte) error
- func (c *Contract) Send(ctx context.Context, methodName string, args ...any) (*tx.Transaction, error)
- type Erc20
- func (c *Erc20) Allowance(ctx context.Context, owner, spender address.Address) (*big.Int, error)
- func (c *Erc20) Approve(ctx context.Context, spender address.Address, amount *big.Int, ...) (*tx.Transaction, error)
- func (c *Erc20) BalanceOf(ctx context.Context, addr address.Address) (*big.Int, error)
- func (c *Erc20) Clone() *Erc20
- func (c *Erc20) Decimals(ctx context.Context) (int, error)
- func (c *Erc20) GetApprovalEvents(tx *tx.Transaction) ([]ApprovalEvent, error)
- func (c *Erc20) GetEvents(tx *tx.Transaction) ([]Erc20Event, error)
- func (c *Erc20) GetTransferEvents(tx *tx.Transaction) ([]TransferEvent, error)
- func (c *Erc20) Name(ctx context.Context) (string, error)
- func (c *Erc20) SetSigner(signer client.Signer)
- func (c *Erc20) Signer() client.Signer
- func (c *Erc20) Symbol(ctx context.Context) (string, error)
- func (c *Erc20) TotalSupply(ctx context.Context) (*big.Int, error)
- func (c *Erc20) Transfer(ctx context.Context, to address.Address, amount *big.Int, option *SendOption) (*tx.Transaction, error)
- func (c *Erc20) TransferFrom(ctx context.Context, from, to address.Address, amount *big.Int, ...) (*tx.Transaction, error)
- type Erc20Event
- type Event
- type EventInput
- type Method
- type SendOption
- type TransferEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMethodNotFound = fmt.Errorf("method not found") ErrEventTypeNotFound = fmt.Errorf("event type not found") )
Functions ¶
This section is empty.
Types ¶
type ApprovalEvent ¶
type Contract ¶
func (*Contract) GetConstantMethod ¶
func (c *Contract) GetConstantMethod(methodName string) ConstantMethod
func (*Contract) GetEventsByName ¶
type Erc20 ¶
type Erc20 struct {
// contains filtered or unexported fields
}
func (*Erc20) GetApprovalEvents ¶
func (c *Erc20) GetApprovalEvents(tx *tx.Transaction) ([]ApprovalEvent, error)
func (*Erc20) GetEvents ¶
func (c *Erc20) GetEvents(tx *tx.Transaction) ([]Erc20Event, error)
func (*Erc20) GetTransferEvents ¶
func (c *Erc20) GetTransferEvents(tx *tx.Transaction) ([]TransferEvent, error)
func (*Erc20) TransferFrom ¶
type Erc20Event ¶
type Erc20Event struct { Name string TransferEvent ApprovalEvent }
func (Erc20Event) String ¶
func (e Erc20Event) String() string
type EventInput ¶
type SendOption ¶
type SendOption struct {
FeeLimit int64
}
Click to show internal directories.
Click to hide internal directories.