attributes

package
v0.0.0-...-623e229 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package attributes provides routines to work with token attributes intended to be used to build testing helpers for forge.

Index

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

func ReadAttributesCSV(filePath string) ([]*erc721.Attribute, error)

ReadAttributesCSV loads and parses a CSV file containing attributes. Format: type, value

func UnmarshalReferenceMetadataJSON

func UnmarshalReferenceMetadataJSON(path string) ([]erc721.Metadata, error)

UnmarshalReferenceMetadataJSON loads and unmarshals a reference metadata file.

func ValidateAttributes

func ValidateAttributes(got, want []*erc721.Attribute) error

ValidateAttributes validates a given set of attributes agains provided reference data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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