Skip to content

Commit

Permalink
Merge pull request compound-finance#10 from poap-xyz/feature/token-mi…
Browse files Browse the repository at this point in the history
…nt-order

✨Add: Mint order for token
  • Loading branch information
PecchioLucas authored May 2, 2022
2 parents 8091639 + d66a3bb commit 78181ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@ 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:<network>
yarn codegen
yarn build
yarn deploy:<network>
```


## Deployments

### Mainnet
Expand Down
1 change: 1 addition & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type Token @entity
transfers: [Transfer!]! @derivedFrom(field: "token")
transferCount: BigInt!
created: BigInt!
mintOrder: BigInt
}

type Account @entity
Expand Down
1 change: 1 addition & 0 deletions src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 78181ad

Please sign in to comment.