hardhat

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Package hardhat provides an interface for parsing hardhat deployments

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract added in v0.1.10

type Contract struct {
	Name              string                     `json:"contractName"`
	Abi               interface{}                `json:"abi"`
	Bytecode          string                     `json:"bytecode"`
	DeployedBytecode  string                     `json:"deployedBytecode"`
	SourceMap         string                     `json:"sourceMap"`
	DeployedSourceMap string                     `json:"deployedSourceMap"`
	Source            string                     `json:"source"`
	SourcePath        string                     `json:"sourcePath"`
	Ast               ContractAst                `json:"legacyAST"`
	Compiler          ContractCompiler           `json:"compiler"`
	Networks          map[string]ContractNetwork `json:"networks"`

	SchemaVersion string    `json:"schemaVersion"`
	UpdatedAt     time.Time `json:"updatedAt"`
}

Contract is a contract representation in the hardhat parser.

func GetDeployments

func GetDeployments(deploymentDir string) (contracts []Contract, err error)

GetDeployments parses all contract deployments from a directory.

type ContractAst added in v0.1.10

type ContractAst struct {
	AbsolutePath    string           `json:"absolutePath"`
	ExportedSymbols map[string][]int `json:"exportedSymbols"`
	ID              int              `json:"id"`
	NodeType        string           `json:"nodeType"`
	Nodes           []Node           `json:"nodes"`
	Src             string           `json:"src"`
}

ContractAst is the ast of a contract.

type ContractCompiler added in v0.1.10

type ContractCompiler struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

ContractCompiler is the compiler metadata used for contracts.

type ContractNetwork added in v0.1.10

type ContractNetwork struct {
	Events          interface{} `json:"events"`
	Links           interface{} `json:"links"`
	Address         string      `json:"address"`
	TransactionHash string      `json:"transactionHash"`
}

ContractNetwork is the network metadata used for contracts.

type ContractSources added in v0.1.10

type ContractSources struct {
	Content string `json:"content"`
}

ContractSources is the source of a contract.

type HardhatContract added in v0.1.10

type HardhatContract struct {
	Contract
	Address  string         `json:"address"`
	Receipt  hardhatReceipt `json:"receipt"`
	Metadata string         `json:"metadata"`
}

HardhatContract is a contract representation in the hardhat parser. nolint: golint, revive

type Node added in v0.1.10

type Node struct {
	NodeType     string `json:"nodeType"`
	AbsolutePath string `json:"absolutePath"`
	File         string `json:"file"`
}

Node is a node in the ast.

Jump to

Keyboard shortcuts

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