Documentation ¶
Overview ¶
Package librarylink provides the `LinkReference` and `LinkValue` structs which describe bytecode linking locations. Further information can be found at http://ethpm.github.io/ethpm-spec/package-spec.html#the-link-reference-object
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkReference ¶
type LinkReference struct { Offsets []int `json:"offsets"` Length int `json:"length"` Name string `json:"name,omitempty"` }
LinkReference A defined location in some bytecode which requires linking
func (*LinkReference) Build ¶
func (l *LinkReference) Build(name string, offsets []map[string]int)
Build Takes a name for the linked contract, as well as the offset array from the compiler statndard json output link references key for this contract, and builds the LinkReference struct
func (*LinkReference) Validate ¶
func (l *LinkReference) Validate() (err error)
Validate ensures the LinkReference struct conforms to the standard found here https://ethpm.github.io/ethpm-spec/package-spec.html#the-link-reference-object
type LinkValue ¶
type LinkValue struct { Offsets []int `json:"offsets"` Type string `json:"type"` Value string `json:"value"` }
LinkValue A value for an individual link reference in a contract's bytecode