repository

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractCode

type ContractCode struct {
	Address      core.Address // 合约地址
	OriginalCode []byte       // 原始代码
	InjectedCode []byte       // 注入gas信息后的代码
	Dependencies []string     // 依赖的其他合约地址
	UpdateTime   time.Time    // 最后更新时间
	Hash         [32]byte     // 代码哈希
}

ContractCode 合约代码信息

type ContractMetadata

type ContractMetadata struct {
	Hash         string    `json:"hash"`         // 代码哈希
	UpdateTime   time.Time `json:"update_time"`  // 更新时间
	Dependencies []string  `json:"dependencies"` // 依赖列表
}

ContractMetadata 合约元数据

type Manager

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

Manager 代码管理器

func NewManager

func NewManager(rootDir string) (*Manager, error)

NewManager 创建代码管理器

func (*Manager) GetCode

func (m *Manager) GetCode(address core.Address) (*ContractCode, error)

GetCode 获取合约代码

func (*Manager) GetInjectedCode

func (m *Manager) GetInjectedCode(address core.Address) ([]byte, error)

GetInjectedCode 获取注入gas信息后的代码

func (*Manager) RegisterCode

func (m *Manager) RegisterCode(address core.Address, code []byte) error

RegisterCode 注册新的合约代码

Jump to

Keyboard shortcuts

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