Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultGasPrice = 1879048192 // 0x70000000 DefaultGasLimit = 5242880 // 0x500000 DefaultRPCAddress = "http://127.0.0.1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TxRelayer ¶
type TxRelayer interface { // Call executes a message call immediately without creating a transaction on the blockchain Call(from ethgo.Address, to ethgo.Address, input []byte) (string, error) // SendTransaction signs given transaction by provided key and sends it to the blockchain SendTransaction(txn *ethgo.Transaction, key ethgo.Key) (*ethgo.Receipt, error) // SendTransactionLocal sends non-signed transaction // (this function is meant only for testing purposes and is about to be removed at some point) SendTransactionLocal(txn *ethgo.Transaction) (*ethgo.Receipt, error) }
func NewTxRelayer ¶
func NewTxRelayer(opts ...TxRelayerOption) (TxRelayer, error)
type TxRelayerImpl ¶
type TxRelayerImpl struct {
// contains filtered or unexported fields
}
func (*TxRelayerImpl) Call ¶
Call executes a message call immediately without creating a transaction on the blockchain
func (*TxRelayerImpl) SendTransaction ¶
func (t *TxRelayerImpl) SendTransaction(txn *ethgo.Transaction, key ethgo.Key) (*ethgo.Receipt, error)
SendTransaction signs given transaction by provided key and sends it to the blockchain
func (*TxRelayerImpl) SendTransactionLocal ¶
func (t *TxRelayerImpl) SendTransactionLocal(txn *ethgo.Transaction) (*ethgo.Receipt, error)
SendTransactionLocal sends non-signed transaction (this function is meant only for testing purposes and is about to be removed at some point)
type TxRelayerOption ¶
type TxRelayerOption func(*TxRelayerImpl)
func WithClient ¶
func WithClient(client *jsonrpc.Client) TxRelayerOption
func WithIPAddress ¶
func WithIPAddress(ipAddress string) TxRelayerOption
func WithReceiptTimeout ¶
func WithReceiptTimeout(receiptTimeout time.Duration) TxRelayerOption
Click to show internal directories.
Click to hide internal directories.