ethartifact

package
v1.17.3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: LGPL-3.0, MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	ContractName string
	ABI          abi.ABI
	Bin          []byte
	DeployedBin  []byte
}

func MustParseArtifactJSON added in v1.4.1

func MustParseArtifactJSON(artifactJSON string) Artifact

func ParseArtifactJSON

func ParseArtifactJSON(artifactJSON string) (Artifact, error)

func (Artifact) Decode added in v1.5.0

func (a Artifact) Decode(result interface{}, method string, data []byte) error

func (Artifact) Encode added in v1.5.0

func (a Artifact) Encode(method string, args ...interface{}) ([]byte, error)

type ContractRegistry

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

func NewContractRegistry

func NewContractRegistry() *ContractRegistry

func (*ContractRegistry) Add

func (c *ContractRegistry) Add(artifact Artifact) error

func (*ContractRegistry) ContractNames

func (c *ContractRegistry) ContractNames() []string

func (*ContractRegistry) Encode

func (c *ContractRegistry) Encode(contractName, method string, args ...interface{}) ([]byte, error)

func (*ContractRegistry) Get

func (c *ContractRegistry) Get(name string) (Artifact, bool)

func (*ContractRegistry) MustAdd

func (c *ContractRegistry) MustAdd(contractABI Artifact)

func (*ContractRegistry) MustGet added in v1.17.0

func (c *ContractRegistry) MustGet(name string) Artifact

func (*ContractRegistry) MustRegister

func (c *ContractRegistry) MustRegister(contractName string, contractABI abi.ABI, contractBin []byte) Artifact

func (*ContractRegistry) MustRegisterJSON

func (c *ContractRegistry) MustRegisterJSON(contractName string, contractABIJSON string, contractBin []byte) Artifact

func (*ContractRegistry) Register

func (c *ContractRegistry) Register(contractName string, contractABI abi.ABI, contractBin []byte) (Artifact, error)

func (*ContractRegistry) RegisterJSON

func (s *ContractRegistry) RegisterJSON(contractName string, contractABIJSON string, contractBin []byte) (Artifact, error)

type RawArtifact

type RawArtifact struct {
	ContractName     string          `json:"contractName"`
	ABI              json.RawMessage `json:"abi"`
	Bytecode         string          `json:"bytecode"`
	DeployedBytecode string          `json:"deployedBytecode"`
}

func ParseArtifactFile

func ParseArtifactFile(path string) (RawArtifact, error)

Jump to

Keyboard shortcuts

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