Documentation ¶
Index ¶
- type Artifact
- type ContractRegistry
- func (c *ContractRegistry) Add(artifact Artifact) error
- func (c *ContractRegistry) ContractNames() []string
- func (c *ContractRegistry) Encode(contractName, method string, args ...interface{}) ([]byte, error)
- func (c *ContractRegistry) Get(name string) (Artifact, bool)
- func (c *ContractRegistry) MustAdd(contractABI Artifact)
- func (c *ContractRegistry) MustGet(name string) Artifact
- func (c *ContractRegistry) MustRegister(contractName string, contractABI abi.ABI, contractBin []byte) Artifact
- func (c *ContractRegistry) MustRegisterJSON(contractName string, contractABIJSON string, contractBin []byte) Artifact
- func (c *ContractRegistry) Register(contractName string, contractABI abi.ABI, contractBin []byte) (Artifact, error)
- func (s *ContractRegistry) RegisterJSON(contractName string, contractABIJSON string, contractBin []byte) (Artifact, error)
- type RawArtifact
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
func MustParseArtifactJSON ¶ added in v1.4.1
func ParseArtifactJSON ¶
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) 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 (*ContractRegistry) MustRegisterJSON ¶
func (c *ContractRegistry) MustRegisterJSON(contractName string, contractABIJSON string, contractBin []byte) Artifact
func (*ContractRegistry) RegisterJSON ¶
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)
Click to show internal directories.
Click to hide internal directories.