relays

package
v0.0.0-...-efbd42f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller definition.

func NewController

func NewController(srv *relays.Service, logger *zap.Logger) *Controller

NewController create a new controler.

func (*Controller) FindOne

func (c *Controller) FindOne(ctx *fiber.Ctx) error

FindByVAA godoc @Description Get a specific relay information by chainID, emitter address and sequence. @Tags deltaswapscan @ID find-relay-by-vaa-id @Success 200 {object} relays.RelayResponse @Failure 400 @Failure 500 @Router /api/v1/relays/:chain/:emitter/:sequence [get]

type DeliveryReponse

type DeliveryReponse struct {
	ResultExecution ResultExecutionResponse `json:"execution"`
	RelayGasUsed    int                     `json:"relayGasUsed"`
}

type InstructionsResponse

type InstructionsResponse struct {
	EncodedExecutionInfo   string `json:"encodedExecutionInfo"`
	RefundAddress          string `json:"refundAddress"`
	SourceDeliveryProvider string `json:"sourceDeliveryProvider"`
	SenderAddress          string `json:"senderAddress"`
	VaaKeys                []any  `json:"vaaKeys"`
	ExtraReceiverValue     struct {
		Hex         string `json:"_hex"`
		IsBigNumber bool   `json:"_isBigNumber"`
	} `json:"extraReceiverValue"`
	TargetAddress          string `json:"targetAddress"`
	RequestedReceiverValue struct {
		Hex         string `json:"_hex"`
		IsBigNumber bool   `json:"_isBigNumber"`
	} `json:"requestedReceiverValue"`
	RefundChainID          int    `json:"refundChainId"`
	RefundDeliveryProvider string `json:"refundDeliveryProvider"`
	TargetChainID          int    `json:"targetChainId"`
}

type RelayDataResponse

type RelayDataResponse struct {
	FromTxHash   string               `json:"fromTxHash"`
	ToTxHash     *string              `json:"toTxHash"`
	Instructions InstructionsResponse `json:"instructions"`
	Delivery     DeliveryReponse      `json:"delivery"`
}

type RelayResponse

type RelayResponse struct {
	ID          string             `json:"id"`
	Relayer     string             `json:"relayer"`
	Status      string             `json:"status"`
	ReceivedAt  time.Time          `json:"receivedAt"`
	CompletedAt *time.Time         `json:"completedAt"`
	FailedAt    *time.Time         `json:"failedAt"`
	Data        *RelayDataResponse `json:"data"`
}

type ResultExecutionResponse

type ResultExecutionResponse struct {
	TransactionHash string `json:"transactionHash"`
	RefundStatus    string `json:"refundStatus"`
	RevertString    string `json:"revertString"`
	Status          string `json:"status"`
	GasUsed         string `json:"gasUsed"`
	Detail          string `json:"detail"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL