Documentation ¶
Overview ¶
Package attributes provides routines to work with token attributes intended to be used to build testing helpers for forge.
Index ¶
- func LoadReferenceAttributes(path string, tokenID int, ignore []string) ([]*erc721.Attribute, error)
- func ReadAttributesCSV(filePath string) ([]*erc721.Attribute, error)
- func UnmarshalReferenceMetadataJSON(path string) ([]erc721.Metadata, error)
- func ValidateAttributes(got, want []*erc721.Attribute) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadReferenceAttributes ¶
func LoadReferenceAttributes(path string, tokenID int, ignore []string) ([]*erc721.Attribute, error)
LoadReferenceAttributes loads the attributes of a given token from a reference metadata file.
func ReadAttributesCSV ¶
ReadAttributesCSV loads and parses a CSV file containing attributes. Format: type, value
func UnmarshalReferenceMetadataJSON ¶
UnmarshalReferenceMetadataJSON loads and unmarshals a reference metadata file.
func ValidateAttributes ¶
ValidateAttributes validates a given set of attributes agains provided reference data.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.