Skip to content

Commit

Permalink
Merge pull request #58 from holaplex/aug-17-release
Browse files Browse the repository at this point in the history
Aug 17 release
  • Loading branch information
mackenziewildman authored Aug 24, 2023
2 parents 7c900bc + c20f5b3 commit 519f67a
Show file tree
Hide file tree
Showing 4 changed files with 232 additions and 5 deletions.
4 changes: 3 additions & 1 deletion docs/hub/Guides/cnfts.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,6 @@ To mint a *compressed* NFT, simply set `"compressed": true`.

## Follow along

Demo video coming soon!
Watch the Holaplex team discuss and demonstrate minting cNFTs with Hub:

<iframe src="https://www.loom.com/embed/b88ff06e42df4c49ad6d9c0bdcde930e?sid=8452430a-41b6-4bbc-be54-11d821a85f49" width="640" height="360" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>
6 changes: 2 additions & 4 deletions docs/hub/developers/minting-drops.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ Example:
mutation {
mintEdition(
input: {
{
drop: "drop-id",
recipient: "wallet-address"
}
drop: "drop-id",
recipient: "wallet-address"
}
) {
collectionMint {
Expand Down
212 changes: 212 additions & 0 deletions docs/hub/developers/update-mint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
---
sidebar_position: 9
---

# Update NFTs

In order to update an NFT using Hub, the following criteria must be met:
- The NFT was minted from a Collection on Hub
- The NFT must be on Solana
- The NFT is uncompressed

The following properties of an NFT that satisfies the above criteria can be updated:
- Name
- Symbol
- Description
- Image
- Attributes (add/remove/update)
- Seller fee basis points
- Creator(s)

### Update an NFT
Update support is currently API-only. We are working to add update to Hub Console as well. You can interact with our API at [https://api.holaplex.com/](https://api.holaplex.com/) using an access token from your Hub organization.

```graphql
mutation UpdateMint($input:UpdateMintInput!) {
updateMint(input:$input) {
collectionMint {
id
address
owner
}
}
}
```
Variables:
```json
{
"input":{
"id":"<MINT_ID>",
"sellerFeeBasisPoints":1,
"creators":[
{
"address": "<CREATOR_WALLET_ADDRESS>",
"share": 100,
"verified": false
}
],
"metadataJson": {
"name": "Updated token name",
"symbol": "UPDATEDSYMBOL",
"description": "Updated token image",
"image": "<LINK_TO_IMAGE>",
"attributes": []
}
}
}
```

Note the `creator` field `verified` can only be set to `true` when the creator is the treasury wallet. Otherwise, the `creator` input must have `"verified": false`.

You can view your updated token on Hub Console, on your project's Collections tab. The Type is "Open" for any collections created using the `createCollection` mutation.

Note that a collection is also created for each drop in your project - these collections that correspond to a drop have Type "Drop" and can *not* be updated using the `updateMint` mutation.

#### How to find a `mint_id`

Query the mints in your collection:
```graphql
query GetCollectionMints($collection: UUID!) {
collection(id: $collection) {
mints {
id
creationStatus
owner
createdAt
compressed
metadataJson {
name
}
}
}
}
```

Variables:
```json
{
"collection": "<COLLECTION_ID>"
}
```

Response:
```json
{
"data": {
"collection": {
"mints": [
{
"id": "<MINT_ID>",
"creationStatus": "<CREATION_STATUS>",
"owner": "<CURRENT_OWNER>",
"createdAt": "<CREATED_AT>",
"compressed": <TRUE_OR_FALSE>,
"metadataJson": {
"name": "<TOKEN_NAME>"
}
},
{
"id": "<MINT_ID>",
"creationStatus": "<CREATION_STATUS>",
"owner": "<CURRENT_OWNER>",
"createdAt": "<CREATED_AT>",
"compressed": <TRUE_OR_FALSE>,
"metadataJson": {
"name": "<TOKEN_NAME>"
}
}
]
}
}
}
```

### View update status and update history

To view all updates made to an NFT by Hub, query `updateHistory` on the `mintId`:
```graphql
query GetUpdateHistory($mint: UUID!) {
mint(id: $mint) {
id
updateHistories {
id
txnSignature
status
creditDeductionId
createdBy
createdAt
}
}
}
```

Variables:
```json
{
"mint": "<MINT_ID>"
}
```

Sample response:
```json
{
"data": {
"mint": {
"id": "bebd1d58-21fa-4662-bced-e75d65db52b5",
"updateHistories": [
{
"id": "84aca0ca-6996-468f-9a43-dfd08a545258",
"txnSignature": "jcJ3ECbGZk4NwxqZxnU5EzysWyaiRyvHkEkKppCErVrHHkBBnoA5WiRnKEc6eoZSP6wEhgcet7MJErHVR2GWMPk",
"status": "CREATED",
"creditDeductionId": "0000018a-053d-b9f9-d6d2-ddd021cb5276",
"createdBy": "f18fd233-f02d-4bcb-b5a1-257dd5fff4fb",
"createdAt": "2023-08-17T20:44:07.533964"
},
{
"id": "9b5fe9c4-0751-4af1-bae5-0c6f61ef7a0c",
"txnSignature": "ayWUQY2D3Sc2Kd4obFnq1Sm92STrPJPBku4X5wQ9o6PjuUq4a7o5Y4XUt22jX9fu8rKrt93bP34rN4mhTqhxC52",
"status": "CREATED",
"creditDeductionId": "0000018a-053c-603c-368c-447a9aa4d9d2",
"createdBy": "f18fd233-f02d-4bcb-b5a1-257dd5fff4fb",
"createdAt": "2023-08-17T20:42:39.308182"
}
]
}
}
}
```

### Retry a failed update

If the `status` of your update is `FAILED`, you can retry the update using the `revisionId`. The `revisionId` can be found in the `id` field of `updateHistories` (above).
```graphql
mutation RetryUpdateMint($input: RetryUpdateMintInput!) {
retryUpdateMint(input: $input) {
status
}
}
```

Variables:
```json
{
"input": {
"revisionId":"<REVISION_ID>"
}
}
```

Sample response:
```json
{
"data": {
"retryUpdateMint": {
"status": "PENDING"
}
}
}
```

## Follow along

Demo video coming soon!
15 changes: 15 additions & 0 deletions docs/hub/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ sidebar_position: 7

# Release Notes

## August 17, 2023

Features:

- [Update mint through HUB API](./developers/update-mint.md)
- Collection mint details page on HUB Console (from Collection page, click on a token to view details)
- Query collection mints by ID

Fixes:

- Add downcasing of Polygon addresses
- Allow blank values on credit schedule on HUB Console
- Fix total mints of collection when a collection is imported
- Check organization balance before creating records to ensure no partial actions

## August 3, 2023

Features:
Expand Down

0 comments on commit 519f67a

Please sign in to comment.