Commit Graph

12 Commits

Author SHA1 Message Date
Shredder 2eca4be8f0
feat: update subgraph and its new mint handler + test refactor (#186)
* feat: update newMint and add verifier and apAutoApproval, update subgraph accordingly.

* remove: bugged tests.
2023-03-17 19:08:17 +03:30
Shredder c8a63b8618
feat: updating subgraph following the ACL refactor (#144)
* refactor: remove unavailable imports, remove outdated entities, add command to regenerate the compile and codegen.

* feat: add handler for initialized, tokenrolechanged and collectionrolechanged.

* refactor: remove the collection entity.

* refactor: implement zoruka's requested changes - best practice recommendations.
2023-03-06 22:57:22 +03:30
Shredder a6123d4c22
feat: access point integration with the subgraph (#141)
* feat: define entities, add handlers for access points.

* feat: change ChangeAccessPointAutoApproval event to metadataUpdate with boolean value (new event), and also add NewMint handler again.

* test: rename ChangeAccessPointStatus to ChangeAccessPointCreationStatus in hardhat tests.

* refactor: deploy the new version of the contract and update the proxy address and block number in the subgraph config file.

* refactor: change name of status to creationStatus in schema.

Co-authored-by: Janison Sivarajah <jsonsivar@gmail.com>

* refactor: remove commented handlers for ACL.

* feat: add the condition for deploying proxy again

* refactor: remove newAccessPoint from subgraph.yaml

---------

Co-authored-by: Janison Sivarajah <jsonsivar@gmail.com>
2023-02-27 19:11:03 -05:00
Shredder 751983ff37
test: base layout of the subgraph tests and fixing deprecated events (#145)
* test: restructure the dir, add config file, divide transfer tests to a separate file.

* test: divide newTokenName tests.

* test: add tests for NewTokenENS, build, external urls, description.

* fix: update tests in newTokenENS.

* test: add owner tests.

* feat: add compile command to subgraph package.json

* test: remove deprecated events and their handlers and tests. add newmint mock handler.

* fix: error in the order of passed parameters in NewMint mock creator function.
2023-02-28 01:00:45 +03:30
Shredder d7841717ff
feat: metadata update and token changes on subgraph (#135)
* feat: add entity and handler.

* merge: reverse lookup and ap auto approval.

* feat: update the token entity on metadata changes.

* merge: develop. fix conflicts.

* fix: tests.
2023-02-24 16:39:25 +03:30
Shredder 2ae7666648
feat: subgraph reverse lookup (gitRepo -> NFA) (#131)
* feat: define the GithubRepository entity and update the Token entity to include it.

* feat: add NewMint event to the contract and emit it in the mint function.

* feat: add newmint entity, update token and gitrepository entities. add handler for entities. update transfer entity handler. update subgraph.yaml config.

* chore: deployment update

* chore: fix proxy file with before deployments

* fix: remove constructor args in verify-polyscan.js file and update contract address at subgraph.yaml

* fix: remove develop from subgraph.yaml gh action.

* merge: develop with auto approval settings into reverse lookup branch

* fix: remove the word settings from acesspointautoapproval param.

* fix: error in hardhat last token id test

* fix: solidity tests.

* fix: proxy contract address in subgraph.yaml.

* chore: run subgraph tests only on main PRs

---------

Co-authored-by: Felipe Mendes <zo.fmendes@gmail.com>
2023-02-24 16:22:18 +03:30
Shredder 1fe91a137b
feat: collection and collectionOwner entities (#122)
* feat: add Collection and CollectionOwner entities. Handle CollectionOwner on CollectionRoleGranted and CollectionRoleRevoked events.

* feat: collection entity and its handler.
2023-02-11 00:45:27 +03:30
Shredder 7f1aca15dd
test: init subgraph unit tests (#117)
* test: add unit tests for the subgraph for events transfer, NewTokenName, NewTokenDescription, NewTokenExternalURL, NewTokenENS, NewTokenBuild

* fix: import errors

* fix: remove keyword "indexed" for strings in events.

* fix: update subgraph.yaml, schema.graphql, and all generated files with the test files to match the new interface of the contract events.

* fix: expose a makeEventId function to avoid repeating code for id generation and also change logIndex before handling events. Update tests to match the new  changes.

* chore: remove Holder.

* fix: wrong import for newLogoEvent
2023-02-10 21:13:43 +03:30
Shredder f37fcbc315
feat: replace the Holder entity with the Owner and handle transfer and mint cases. (#100) 2023-02-03 18:16:26 +03:30
Shredder 7e46146a24
feat: add controller entity and handlers. (#99)
* feat: add controller entity and handlers.

* chore: update the log messages to be more precise

* fix: mistake in the log of roleRevoked events.
2023-02-03 12:13:18 +03:30
Janison Sivarajah ce1a3fc141
feat: add token and holder entities (#94)
* chore: add the verify command to the package.json file

* docs: add the re-deployment section to the README.md file

* feat: add support for token and holder entities based on transfer events that are emitted from the contract during the mint process.

---------

Co-authored-by: EmperorOrokuSaki <artie.eth@gmail.com>
2023-01-31 19:13:23 +03:30
Shredder 61aeaaae66
feat: subgraph setup for the FleekNFA contracts (#72)
* Add verify script and update hardhat config to automate all future code verifications on polygonscan

* Update deployments to match the new deployed instance of the contract on polygon mumbai testnet (verified)

* feat: Generate the base of the subgraph by graph-cli based on the verified deployed instance on mumbai

* bug: fixed type errors in the typescript specification file.

* chore: generate a new build of the subgraph

* feat: write a script to perform multiple types of queries on the subgraph

* docs: Write a README for the query-examples directory to guide users on how they can perform queries

* chore: remove the heavy subgraph generated WASM and add all .WASM files to .gitignore

* chore: apply the requested changes from Zoruka on the verify_polyscan.js file

* docs: write the readme doc for the subgraph

* chore: remove deploy from package.json and add build, abis, and generated to .gitignore

* chore: remove abis, build, and generated from the branch

* chore: move query-examples to examples/query/ and gitignore .graphclient

* docs: update readme (add a section for developing and describe build and generated directories better)

* chore: remove graphql from the root package.json file
2023-01-31 18:29:42 +03:30