From 60b4e3d8eafc02805685b79c4d818054f0828e1b Mon Sep 17 00:00:00 2001 From: cxkoda Date: Wed, 4 Jan 2023 08:46:00 +0100 Subject: [PATCH] Adding collection name to the metadata struct (#69) --- erc721/erc721.go | 13 +++++++------ package.json | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/erc721/erc721.go b/erc721/erc721.go index 9789adf..fa4087d 100644 --- a/erc721/erc721.go +++ b/erc721/erc721.go @@ -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, diff --git a/package.json b/package.json index 5662906..5fbb828 100644 --- a/package.json +++ b/package.json @@ -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": {