Documentation ¶
Index ¶
- func NewTransactor(keyFile string, password string) (*bind.TransactOpts, error)
- func SetNextNonce(client *ethclient.Client, opts *bind.TransactOpts) error
- type Connection
- func (c *Connection) RawCall(result interface{}, method string, args ...interface{}) error
- func (c *Connection) RawCallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error
- func (c *Connection) SetGasPrice(wei *big.Int)
- func (c *Connection) SetKeyStore(keystorePath string) error
- func (c *Connection) SetNextNonce() error
- func (c *Connection) SetNonce(nonce uint64)
- func (c *Connection) SetSuggestedGasPrice() error
- func (c *Connection) SetTransactor(keyPath, password string) error
- func (c *Connection) SetTransactorFromKeyStore(a common.Address, password string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransactor ¶
func NewTransactor(keyFile string, password string) (*bind.TransactOpts, error)
NewTransactor returns a new transactor for the given keyFile.
func SetNextNonce ¶
func SetNextNonce(client *ethclient.Client, opts *bind.TransactOpts) error
SetNextNonce sets the next nonce of the transactor address.
Types ¶
type Connection ¶
type Connection struct { *ethclient.Client Opts *bind.TransactOpts KeyStore *keystore.KeyStore // contains filtered or unexported fields }
Connection wraps 'etherclient.Client' to hold transactor options and a key-store.
func NewForKey ¶
func NewForKey(url, keyFile, password string) (*Connection, error)
NewForKey creates a new connection using the given key-store file and password.
func NewForKeyStore ¶
func NewForKeyStore(url, keystorePath string, a common.Address, password string) (*Connection, error)
NewForKeyStore creates a new connection using the given key-store and password.
func (*Connection) RawCall ¶ added in v0.0.3
func (c *Connection) RawCall(result interface{}, method string, args ...interface{}) error
RawCall performs a JSON-RPC call against the underlying RPC connection
func (*Connection) RawCallContext ¶ added in v0.0.3
func (c *Connection) RawCallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error
RawCall performs a JSON-RPC call against the underlying RPC connection, using the given context
func (*Connection) SetKeyStore ¶
func (c *Connection) SetKeyStore(keystorePath string) error
SetKeyStore sets the connections keystore to the path provided.
func (*Connection) SetNextNonce ¶
func (c *Connection) SetNextNonce() error
SetNextNonce sets nonce to the next available for the transactor's address.
func (*Connection) SetNonce ¶
func (c *Connection) SetNonce(nonce uint64)
SetNonce sets the nonce to the provided value. This can be used to replay a stuck transaction.
func (*Connection) SetSuggestedGasPrice ¶
func (c *Connection) SetSuggestedGasPrice() error
SetSuggestedGasPrice sets the suggested gas price of the connection.
func (*Connection) SetTransactor ¶
func (c *Connection) SetTransactor(keyPath, password string) error
SetTransactor sets the connections transactor to that of the given keyFile.
func (*Connection) SetTransactorFromKeyStore ¶
func (c *Connection) SetTransactorFromKeyStore(a common.Address, password string) error
SetTransactorFromKeyStore sets the connections transactor to the address within the key-tore.