Documentation ¶
Index ¶
- type Backend
- func (b *Backend) AddAccount(privkey *ecdsa.PrivateKey) (common.Address, error)
- func (b *Backend) BindOpts(ctx context.Context, from common.Address) (*bind.TransactOpts, error)
- func (b *Backend) Chain() (string, uint64)
- func (b *Backend) Send(ctx context.Context, from common.Address, candidate txmgr.TxCandidate) (*ethtypes.Transaction, *ethtypes.Receipt, error)
- func (b *Backend) SendTransaction(ctx context.Context, in *ethtypes.Transaction) error
- func (b *Backend) Sign(from common.Address, input [32]byte) ([65]byte, error)
- func (b *Backend) WaitMined(ctx context.Context, tx *ethtypes.Transaction) (*ethtypes.Receipt, error)
- type Backends
- type Waiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
func NewBackend ¶
func (*Backend) AddAccount ¶
func (*Backend) BindOpts ¶
BindOpts returns a new TransactOpts for interacting with bindings based contracts for the provided account. The TransactOpts are partially stubbed, since txmgr handles nonces and signing.
Do not cache or store the TransactOpts, as they are not safe for concurrent use (pointer). Rather create a new TransactOpts for each transaction.
func (*Backend) SendTransaction ¶
SendTransaction intercepts the tx that bindings generates, extracts the from address (assuming the backendStubSigner was used), the strips fields, and passes it to the txmgr for reliable broadcasting.
type Backends ¶
type Backends struct {
// contains filtered or unexported fields
}
Backends is a wrapper around a set of Backends, one for each chain. At this point, it only supports "a single account for all Backends".
See Backends godoc for more information.