Documentation ¶
Index ¶
- Constants
- Variables
- func CreateGrpcConnection(isInsecure bool, grpcAddress string) (*grpc.ClientConn, error)
- type SettlusClient
- func (sc *SettlusClient) BuildAndSendTxWithRetry(ctx context.Context, msg sdk.Msg) error
- func (sc *SettlusClient) Close()
- func (sc *SettlusClient) FetchNewRoundInfo(ctx context.Context) (*oracletypes.RoundInfo, error)
- func (sc *SettlusClient) GetLatestHeight(ctx context.Context) (int64, error)
- func (sc *SettlusClient) UpdateSequenceFromError(log string) error
Constants ¶
View Source
const ( MaxConnections = 10 TxRetryCount = 3 TxRetryDelay = time.Millisecond * 500 HeightRetryCount = 3 HeightRetryDelay = time.Millisecond * 50 )
Variables ¶
View Source
var (
HTTPProtocols = regexp.MustCompile("https?://")
)
Functions ¶
func CreateGrpcConnection ¶
func CreateGrpcConnection(isInsecure bool, grpcAddress string) (*grpc.ClientConn, error)
CreateGrpcConnection creates a new gRPC client connection from the given configuration
Types ¶
type SettlusClient ¶
type SettlusClient struct {
// contains filtered or unexported fields
}
func NewSettlusClient ¶
func NewSettlusClient(config *config.Config, ctx context.Context, s signer.Signer, logger cometlog.Logger) (*SettlusClient, error)
NewSettlusClient creates a new SettlusClient instance
func (*SettlusClient) BuildAndSendTxWithRetry ¶
BuildAndSendTxWithRetry builds and sends a transaction to the Settlus node
func (*SettlusClient) FetchNewRoundInfo ¶ added in v0.0.6
func (sc *SettlusClient) FetchNewRoundInfo(ctx context.Context) (*oracletypes.RoundInfo, error)
func (*SettlusClient) GetLatestHeight ¶
func (sc *SettlusClient) GetLatestHeight(ctx context.Context) (int64, error)
GetLatestHeight tries getting the latest height from the RPC client.
func (*SettlusClient) UpdateSequenceFromError ¶ added in v0.2.0
func (sc *SettlusClient) UpdateSequenceFromError(log string) error
UpdateSequenceFromError updates the sequence number from the error log
Click to show internal directories.
Click to hide internal directories.