Documentation ¶
Index ¶
- Constants
- Variables
- func LogSkipper(c echo.Context) bool
- type DataStruct
- type FeeType
- type JSONData
- type Message
- type NewServerOpts
- type Raw
- type Server
- func (srv *Server) GetBlockInfo(c echo.Context) error
- func (srv *Server) GetEventsByAddress(c echo.Context) error
- func (srv *Server) GetRecommendedProcessingFees(c echo.Context) error
- func (srv *Server) Health(c echo.Context) error
- func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (srv *Server) Shutdown(ctx context.Context) error
- func (srv *Server) Start(address string) error
- type Stats
Constants ¶
View Source
const ( Layer1 layer = iota Layer2 layer = iota )
Variables ¶
View Source
var ( ErrNoHTTPFramework = errors.Validation.NewWithKeyAndDetail( "ERR_NO_HTTP_ENGINE", "HTTP framework required", ) ErrNoRewarder = errors.Validation.NewWithKeyAndDetail( "ERR_NO_REWARDER", "Rewarder is required", ) )
Functions ¶
func LogSkipper ¶
Types ¶
type DataStruct ¶
type FeeType ¶
type FeeType uint64
type Message ¶
type Message struct { Id int `json:"Id"` To string `json:"To"` Fee int64 `json:"Fee"` Data string `json:"Data"` From string `json:"From"` Value int64 `json:"Value"` GasLimit int `json:"GasLimit"` SrcOwner string `json:"SrcOwner"` DestOwner string `json:"DestOwner"` SrcChainId int `json:"SrcChainId"` DestChainId int `json:"DestChainId"` }
type NewServerOpts ¶
type NewServerOpts struct { Echo *echo.Echo EventRepo relayer.EventRepository CorsOrigins []string SrcEthClient ethClient DestEthClient ethClient ProcessingFeeMultiplier float64 TaikoL2 *taikol2.TaikoL2 }
func (NewServerOpts) Validate ¶
func (opts NewServerOpts) Validate() error
type Raw ¶
type Raw struct { Data string `json:"data"` Topics []string `json:"topics"` Address string `json:"address"` Removed bool `json:"removed"` LogIndex string `json:"logIndex"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` TransactionHash string `json:"transactionHash"` TransactionIndex string `json:"transactionIndex"` }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
@host relayer.hekla.taiko.xyz Server represents an relayer http server instance.
func NewServer ¶
func NewServer(opts NewServerOpts) (*Server, error)
func (*Server) GetBlockInfo ¶
getBlockInfoResponse
returns block info for the chains @Summary Get block info @ID get-block-info @Accept json @Produce json @Success 200 {object} getBlockInfoResponse @Router /blockInfo [get]
func (*Server) GetEventsByAddress ¶
GetEventsByAddress
returns events by address @Summary Get events by address @ID get-events-by-address @Param address query string true "address to query" @Param msgHash query string false "msgHash to query" @Param chainID query string false "chainID to query" @Param eventType query string false "eventType to query" @Param event query string false "event to query" @Accept json @Produce json @Success 200 {object} paginate.Page @Router /events [get]
func (*Server) GetRecommendedProcessingFees ¶
GetRecommendedProcessingFees
returns block info for the chains @Summary Get block info @ID get-block-info @Accept json @Produce json @Success 200 {object} getBlockInfoResponse @Router /blockInfo [get]
func (*Server) ServeHTTP ¶
func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the `http.Handler` interface which serves HTTP requests
Click to show internal directories.
Click to hide internal directories.