Skip to content

Commit

Permalink
Adding collection name to the metadata struct (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
cxkoda authored Jan 4, 2023
1 parent 72c44e9 commit 60b4e3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions erc721/erc721.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ func CollectionFromMetadata(md []*Metadata) Collection {
// Metadata carries a parsed JSON payload from ERC721 metadata, compatible with
// OpenSea.
type Metadata struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Image string `json:"image"`
AnimationURL string `json:"animation_url,omitempty"`
ExternalURL string `json:"external_url,omitempty"`
Attributes []*Attribute `json:"attributes,omitempty"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Image string `json:"image"`
AnimationURL string `json:"animation_url,omitempty"`
ExternalURL string `json:"external_url,omitempty"`
CollectionName string `json:"collection_name,omitempty"`
Attributes []*Attribute `json:"attributes,omitempty"`
}

// MarshalJSONTo marshals the Metadata to JSON and writes it to the Writer,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@divergencetech/ethier",
"version": "0.43.0",
"version": "0.44.0",
"description": "Golang and Solidity SDK to make Ethereum development ethier",
"main": "\"\"",
"scripts": {
Expand Down

0 comments on commit 60b4e3d

Please sign in to comment.