Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BroadcastTx ¶
func BroadcastTx(clientCtx client.Context, txf tx.Factory, msgs ...sdk.Msg) (*sdk.TxResponse, error)
BroadcastTx attempts to generate, sign and broadcast a transaction with the given set of messages. It will also simulate gas requirements if necessary. It will return an error upon failure.
Note, BroadcastTx is copied from the SDK except it removes a few unnecessary things like prompting for confirmation and printing the response. Instead, we return the TxResponse.
Types ¶
type OracleClient ¶
type OracleClient struct { Logger zerolog.Logger ChainID string KeyringBackend string KeyringDir string KeyringPass string TMRPC string RPCTimeout time.Duration OracleAddr sdk.AccAddress OracleAddrString string ValidatorAddr sdk.ValAddress ValidatorAddrString string Encoding umeeparams.EncodingConfig GasPrices string GasAdjustment float64 GRPCEndpoint string KeyringPassphrase string }
OracleClient defines a structure that interfaces with the Umee node.
func NewOracleClient ¶
func (OracleClient) BroadcastTx ¶
func (oc OracleClient) BroadcastTx(nextBlockHeight int64, timeoutHeight int64, msgs ...sdk.Msg) error
BroadcastTx attempts to broadcast a signed transaction. If it fails, a few re-attempts will be made until the transaction succeeds or ultimately times out or fails. Ref: https://github.com/terra-money/oracle-feeder/blob/baef2a4a02f57a2ffeaa207932b2e03d7fb0fb25/feeder/src/vote.ts#L230
func (OracleClient) CreateClientContext ¶
func (oc OracleClient) CreateClientContext() (client.Context, error)
CreateClientContext creates an SDK client Context instance used for transaction generation, signing and broadcasting.
func (OracleClient) CreateTxFactory ¶
func (oc OracleClient) CreateTxFactory() (tx.Factory, error)
CreateTxFactory creates an SDK Factory instance used for transaction generation, signing and broadcasting.