internal

package
v0.0.0-...-593eaa3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProxyHTTPClient

func CreateProxyHTTPClient(proxyURL string, timeout time.Duration) (*http.Client, error)

func CreateProxyTransport

func CreateProxyTransport(proxyURL string) (*http.Transport, error)

func ReadLines

func ReadLines(path string) ([]string, error)

ReadLines 从文件中读取每一行并返回切片

func ValidateProxyURL

func ValidateProxyURL(proxyURL string) error

Types

type Contract

type Contract struct {
	Address      string    `json:"address"`      // 合约地址
	Code         string    `json:"contract"`     // 合约代码
	ABI          string    `json:"abi"`          // 合约 ABI(JSON 字符串)
	Balance      string    `json:"balance"`      // 余额(以字符串保存以避免精度/类型问题)
	IsOpenSource bool      `json:"isOpenSource"` // 是否开源 (true/false 对应 1/0)
	CreateTime   time.Time `json:"createtime"`   // 创建时间
	CreateBlock  uint64    `json:"createblock"`  // 创建区块号
	TxLast       time.Time `json:"txlast"`       // 最后一次交互时间
	IsDecompiled bool      `json:"isdecompiled"` //是否开源
	DedCode      string    `json:"dedcode"`      //伪代码

}

Contract 表示待扫描的合约基础信息,包含数据库表字段映射

type ProxyConfig

type ProxyConfig struct {
	URL     string        // 代理URL,例如 http://127.0.0.1:7897
	Timeout time.Duration // 超时时间
}

type ProxyManager

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

func NewProxyManager

func NewProxyManager(proxyURL string, timeout time.Duration) (*ProxyManager, error)

func (*ProxyManager) CreateHTTPClient

func (pm *ProxyManager) CreateHTTPClient(timeout time.Duration) *http.Client

func (*ProxyManager) CreateHTTPTransport

func (pm *ProxyManager) CreateHTTPTransport() *http.Transport

func (*ProxyManager) GetProxyURL

func (pm *ProxyManager) GetProxyURL() string

func (*ProxyManager) IsEnabled

func (pm *ProxyManager) IsEnabled() bool

Jump to

Keyboard shortcuts

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