From f1db03ada6f35a1e349bdd4dc78282c8fb20a931 Mon Sep 17 00:00:00 2001 From: Lucas Pecchio Date: Fri, 29 Apr 2022 19:51:49 -0300 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8Add:=20Mint=20order=20for=20token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ schema.graphql | 1 + src/mapping.ts | 1 + 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index f8e1c6e..818bb43 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,11 @@ yarn build yarn deploy: ``` +If you receive the next error while executing yarn deploy:: +✖ Failed to deploy to Graph node https://api.thegraph.com/deploy/: Invalid account name or access token + +Then you'd need to add --product hosted-service --access-token {TOKEN} just after graph deploy in the package json. + ## Deployments ### Mainnet diff --git a/schema.graphql b/schema.graphql index ff85324..c6d16dd 100644 --- a/schema.graphql +++ b/schema.graphql @@ -6,6 +6,7 @@ type Token @entity transfers: [Transfer!]! @derivedFrom(field: "token") transferCount: BigInt! created: BigInt! + mintOrder: BigInt } type Account @entity diff --git a/src/mapping.ts b/src/mapping.ts index ffd9c37..ad49e93 100644 --- a/src/mapping.ts +++ b/src/mapping.ts @@ -37,6 +37,7 @@ export function handleEventToken(ev: EventTokenEvent): void event.tokenCount += BigInt.fromI32(1); event.transferCount += BigInt.fromI32(1); token.event = event.id; + token.mintOrder = event.tokenCount; event.save(); token.save(); } From 1ede225bbb3af149afa9be2eecb0bac4f092dab4 Mon Sep 17 00:00:00 2001 From: Lucas Pecchio Date: Mon, 2 May 2022 13:06:46 -0300 Subject: [PATCH 2/2] README changes more readable --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 818bb43..80d7615 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,12 @@ yarn install Available networks: mainnet, xdai, sokol, kovan, ropsten +Add +``` +--product hosted-service --access-token {TOKEN} +``` +as extra parameters just after "graph deploy" in the package json and then execute the following: + ```ssh yarn prepare: yarn codegen @@ -18,10 +24,6 @@ yarn build yarn deploy: ``` -If you receive the next error while executing yarn deploy:: -✖ Failed to deploy to Graph node https://api.thegraph.com/deploy/: Invalid account name or access token - -Then you'd need to add --product hosted-service --access-token {TOKEN} just after graph deploy in the package json. ## Deployments