tools

package
v0.0.0-...-cb5de49 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BadBatchRequest = errors.New("bad batch request")

Functions

func BlockIP

func BlockIP(ip string)

func CheckGinIP

func CheckGinIP(c *gin.Context) (_ string, fromCDN bool, isBaned bool)

func CheckJOSNType

func CheckJOSNType(body []byte) byte

func DecodeRequestBody

func DecodeRequestBody(isRpc bool, host string, body []byte) (reqCount int, i interface{}, mustSend2Sentry bool, buildRespByAgent bool, resp interface{}, ethCallCount, ethSendRawTransactionCount int, err error)

func DecodeTx

func DecodeTx(i interface{}) types.Transactions

func EthResp

func EthResp(host string, i, resp interface{}) interface{}

func FormatIP

func FormatIP(s string) string

func IsBanedIP

func IsBanedIP(ip string) bool

func IsRpc

func IsRpc(host string, d map[string]struct{}) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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