Commit Graph

297 Commits

Author SHA1 Message Date
Janison Sivarajah e8468b8e83
Merge pull request #182 from fleekxyz/develop
release: developer pre-release v0.0.4
2023-03-17 17:53:16 -04:00
Shredder 4682be82e9
refactor: metadataUpdate handlers in the subgraph (#187)
* feat: update newMint and add verifier and apAutoApproval, update subgraph accordingly.

* remove: bugged tests.

* refactor: update metadataUpdate handlers to match the new interface.
2023-03-17 19:43:43 +03:30
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
Felipe Mendes ce71790c17
feat: contract when minting can set verifier (#164)
* feat: add token verifier token data and requirement

* feat: add verifier argument on mint function

* test: fix current foundry tests

* test: fix current hardhat tests

* test: add test for non token verifier with verifier role

* fix: mint signature on hardhat tests

* refactor: single mint function

* fix: overloaded mint calls on javascript side
2023-03-16 11:23:50 -03:00
Camila Sosa Morales d30fcc35cd
style: fix bg color due to bad conflicts resolved (#178) 2023-03-15 10:30:16 -05:00
Camila Sosa Morales 2c0cfd9b9b
chore: final mint step and share (#174)
* chore: final mint step and share

* chore: fix comments PR

* Update ui/src/views/mint/mint-stepper.tsx

Co-authored-by: Felipe Mendes <zo.fmendes@gmail.com>

* Update ui/src/views/mint/mint.context.tsx

Co-authored-by: Felipe Mendes <zo.fmendes@gmail.com>

---------

Co-authored-by: Felipe Mendes <zo.fmendes@gmail.com>
2023-03-14 07:44:25 -05:00
Camila Sosa Morales 7985bb35bb
chore: UI implement changes feedback (#173)
* style: combobox add cursor pointer property

* chore: make repository row clickable

* style: fix scroll on repositories list

* chore: select main/master by deafult branch

* chore: add required icon on label form and max characters length

* Update ui/src/components/core/combobox/combobox.tsx

Co-authored-by: Felipe Mendes <zo.fmendes@gmail.com>

* chore: remove commented line

* chore: replace Form.MaxLength

* styles: fix styles for combobox icon

* chore: default branch based on repo config

---------

Co-authored-by: Felipe Mendes <zo.fmendes@gmail.com>
2023-03-13 15:56:17 -05:00
Shredder 5c43ebe0d0
feat: add handler for burns to the transfer handler [subgraph] (#162)
* feat: add handler for burns to the transfer handler

* fix: update transfer.ts to include the changes.
2023-03-14 00:22:37 +03:30
Shredder 3414a96c65
chore: separate handlers by event type [subgraph] (#161)
* chore: separate handlers by event type

* fix: export handlers from the mapping file.
2023-03-14 00:18:08 +03:30
Camila Sosa Morales 9f97ce2ad1
chore: UI clean up console logs (#175)
* chore: add logger

* chore: remove svg-test folder

* chore: remove console logs and add toast
2023-03-13 12:52:04 -05:00
Felipe Mendes c3fe09c1a6
feat: UI fetch mint price on contract (#166)
* chore: update deployment

* feat: add fleekERC721 redux state and billing states

* feat: add billing price to mint flow
2023-03-13 14:07:37 -03:00
Camila Sosa Morales 1eed510527
styles: fix styles combobox and dropdown (#167) 2023-03-13 11:20:53 -05:00
Felipe Mendes df6fbea5c0
feat: erc interface and split out access points to single module (#151)
* wip: compilant version of interface

* refactor: split out access point to single module

* test: fix mint call on hardhat tests

* fix: remove auto approval from NewMint event
2023-03-13 11:07:40 -03:00
Felipe Mendes fbee0945fd
bug: mint button not triggering in dev hosted (#170)
* feat: parse error code using abi

* feat: add prepare error treatment on mint flow
2023-03-13 10:22:58 -03:00
Felipe Mendes d6f8d047c8
feat: review linting for all subfolders (#169)
* chore: setup root eslint

* fix: fix .eslintignore to root folder
2023-03-13 10:21:54 -03:00
Camila Sosa Morales 13a9a1e992
feat: UI toast component (#160)
* chore: install radix toast

* feat: add toast component

* chore: display toast column

* chore: remove commented lines

* chore: fix animation
2023-03-10 09:04:30 -05:00
Shredder e28c7c6e96
test: subgraph matchstick tests for access points and acl refactor (#150)
* fix: errors from deprecated entities.

* fix: events from deprecated entities.

* test: add tests for NewAccessPoint.

* chore: remove yarn-error.log and add it to .gitignore.

* test: add changeAccessPointCreationStatus tests to subgraph matchstick.

* test: add tests for changeAccessPointNameVerify x matchstick

* feat: add utility functions for ACL events

* test: add tests for tokenRoleChanged event

* test: add tests for the CollectionRoleChanged event

* feat: add handleTokenRolesCleared handler function - slipped from the ACL refactor pr.

* refactor: rename the Token owner consts to user consts.

* chore: add .bin to gitignore.
2023-03-09 23:22:38 +03:30
Felipe Mendes 099e6d76d6
chore: UI polyfills for build command (#165)
* chore: fix vite plugin for polyfills

* chore: add prod script command to run production version

* refactor: hash router to run on ipfs
2023-03-08 17:56:36 -03:00
Camila Sosa Morales 9db81d2025
chore: UI setup subgraph querying (#152)
* wip: querying with graph-client and apollo

* feat: fetching last nfts minted with basic pagination

* chore: add .graphclient folder to gitignore and update readme

* chore: teste pagination

* chore: add create ap button in NFA

* chore: remove unsued files

* fix: fix CI

* Update test.yml

* chore: add config to handle graphclient imports

* chore: update queries

* chore: update list nfa views

* chore: add graphql folder. remove unused env variable
2023-03-08 15:28:16 -05:00
Shredder 7387b68571
chore: add / update workflows to do folder filtering (#153)
* Reflect Polygon -> Eth Mainnet change in main readme

* chore: add / update workflows to do folder filtering and run change specific tests.

* chore: run workflows based on both the path and the target branch of pr.

* chore: add graphclient generation command to ui workflow

Co-authored-by: Camila Sosa Morales <camisosa@fleek.xyz>

* style: fix indentation in the ui workflow yml file

---------

Co-authored-by: Janison Sivarajah <jsonsivar@gmail.com>
Co-authored-by: Camila Sosa Morales <camisosa@fleek.xyz>
2023-03-08 09:50:25 +03:30
Felipe Mendes e74e5595da
feat: add verifier role (#148)
* feat: add verifier collection role

* refactor: apply verifier role to verify ap functions

* test: hardhat tests for verifier role

* refactor: grant verifier role for deployer

* test: foundry tests for verifier role

* test: fix fixture after changing deployer to be verifier

* test: change token owner to match connected account on verifier role check
2023-03-07 10:28:31 -03:00
Camila Sosa Morales e5d28251c4
feat: UI integrate ens dropdown (#143)
* chore: get ens names from address

* wip: ens validation

* wip: combobox with option to add new items

* chore: add trim words

* chore: change order steps

* chore: add comments

* chore: change components test view

* chore: remove unused file

* chore: add alchemy-sdk as prod dependency

* chore: pr comments
2023-03-07 08:03:53 -05:00
Felipe Mendes 8e309ee04c
refactor: deployment script to accept argument inputs (#146) 2023-03-07 08:23:34 -03:00
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
Janison Sivarajah 7971ae8cc7
chore: update main readme on Polygon -> Ethereum 2023-03-02 15:50:35 -05:00
Camila Sosa Morales 2560181c74
chore: UI verification step separate (#147)
* feat: add switch component

* chore: add verify step

* chore: move form-step folder

* chore: add text component

* chore: add nfa step to context

* chore: add text on Verify NFA Step
2023-03-01 16:35:08 -05:00
Felipe Mendes b1887765c1
refactor: remove mint collection owner requirement (#149)
* refactor: remove mint acl modifier

* test: fix tests for mint owner requirement
2023-03-01 11:31:46 -03:00
Camila Sosa Morales e3a8ae2429
fix: ck fix other wallet connections (#142)
* fix: fix for allow other wallet connections

* chore: fix dev server polyfills

---------

Co-authored-by: Felipe Mendes <zo.fmendes@gmail.com>
2023-02-28 10:58:20 -05:00
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
Felipe Mendes b8b8cb28ea
feature: conditional payment as setting (#134)
* feat: add base contract for billing

* feat: add withdraw function

* feat: add billing requirement to mint

* test: add foundry tests for minting with billing

* refactor: remove transfer billing and add access point

* test: add access point billing foundry tests

* test: add test for billing value change

* test: add hardhat test setup for billing

* test: add hardhat tests for billing

* feat: add withdrawn event and add public withdraw function

* test: add tests for withdrawing founds and access control for billing

* refactor: fix misspells and change variable names

* feat: add initialize params for billing

* feat: add gap to FleekBilling

* fix: testname misspell
2023-02-27 17:30:19 -03:00
Felipe Mendes 969cd12d92
refactor: use custom errors in solidity (#127)
* refactor: change ap reverts to custom error

* test: fix tests for custom errors

* refactor: change setApprovalForAccessPoint string reverts to custom error
2023-02-27 12:42:41 -03:00
Felipe Mendes b957e87a83
feat: UI mint integration (#139)
* feat: add base hook for fleekerc721

* feat: add test view for minting using wagmi

* refactor: from hook to context creation

* refactor: work on provider configs

* feat: append mint transaction to mint view

* chore: add comments

* feat: add nfa price estimation

* fix: remove forgotten logs

* fix: repo and branch url creating and variable misspells

* fix: accidently removed yarn.lock file

* fix: misspelled repositores

* chore: add disclaimer comment at mint-test view

* refactor: remove wallet store
2023-02-27 11:57:44 -03:00
Shredder b3b9f30f05
chore: remove counters library from the contract code. (#137)
* chore: remove the counters lib from the contract and create private vars instead.

* merge: develop. fix conflicts.

* style: remove unnecessary white space
2023-02-24 16:51:21 +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
Camila Sosa Morales 70df262d94
feat: UI connect kit integration (#136)
* chore: connectkit poc

* feat: add connection on wallet step;

* chore: add info on readme and new env variable

* chore: add continue button if the user is connected

* chore: added constanst env file

* Update ui/src/views/mint/wallet-step/connect-wallet-button.tsx

Co-authored-by: Felipe Mendes <zo.fmendes@gmail.com>

* chore: rename env variables. remove unneccesary files. add connect button

* feat: create providers folder to keep clean code

* ed

* chore: add TODO comment

---------

Co-authored-by: Felipe Mendes <zo.fmendes@gmail.com>
2023-02-23 14:54:01 -05:00
Camila Sosa Morales 964c1a651f
feat: integrate firebase for github login (#132)
* wip: form for mint

* style: change bgcolor for disabled button

* fix: add key to list items

* styles: add some spacings and border radius

* refactor: change type file and move file validation to form

* feat: add minted nft card. add wallet step

* refactor: add mint card header to not repeat code

* styles: add border radius to svg

* styles: fix styles on mint view

* style: fix height mint view

* fix: fix save repository config

* chore: changes based on PR review

* wip: connecting with gh login

* chore: add env variables

* wip: gh login wiht auth0

* feat: add gh login integration

* chore: remove web3auth packages

* doc: add info on readme to know how to get firebase credentials

* feat: add spinner component (#133)

* fix: fix for polyfills

* refactor: remove loading state cause it was causing a loop

* chore: change placeholder

* feat: add constants env file

* fix: fix polyfills

* refactor: implement async thunk for github login

* wip: add async thunk for github api calls

* feat: implemented async thunk for github api calls

* chore: add promise.all to improve api call performance

* fix: fix console log error
2023-02-23 13:38:51 -05:00
Shredder cfea9a90ea
feat: access point auto approval settings for tokens (#121)
* feat: add accessPointAutoApprovalSettings field to mint, app struct, and expose a function for changing the field later + an event.

* feat: add checks for the autoapproval settings on function addAccessPoint.

* feat: add setApprovalForAccessPoint function and ChangeAccessPointApprovalStatus event.

* test: add new constant variables to the hardhat tests and update mint tests.

* feat: update removeAccessPoint function to check the status and also update getAccessPointJSON to include status.

* test: add two access point test files and fix errors and mismatches in them with the auto approval set up

* feat: remove the access point mapping in the App struct and wherever it was used.

* chore: update foundry tests to match the new interface of the contract.

* test: add new tests for the approval settings

* chore: update foundry tests to match new interface.

* test: update foundry tests and the settings for auto approvals

* feat: keep history of removed APs. Update tests.

* fix: make changes to the contract and tests to fix the tests.

* chore: apply changes Zoruka requested.

* fix: change name of setAutoApprovalSettings function in foundry tests.

* perf: revert back to enums, update hardhat and foundry tests.

* fix: apply requested changes by janison.

* fix: error in hardhat test.

* fix: mint params of a foundry test.

* fix: merge errors.

* fix: revert back to tokenOwner for setAutoApproval functions.

* chore: remove comment for accessPointAutoApproval
2023-02-23 12:29:53 +03:30
Felipe Mendes 770ab78668
refactor: clean up acl remove our redundant owner (#114)
* refactor: clean up code, remove address arrays, fix minimal amount of collection owners

* refactor: apply refactored acl functions in main contract

* test: fix tests after refactor

* test: add edge case foundry tests for acl

* test: fix hardhat tests for token roles

* test: fix hardhat tests for collection roles

* test: fix hardhat tests for minting

* test: add new hardhat tests for access control

* refactor: role change events
2023-02-21 14:02:30 -03:00
Felipe Mendes 0f05a912a7
feature: make main contract pausable (#110)
* feat: add FleekPausable

* feat: add FleekPausable functions in FleekERC721

* fix: requirePaused logic

* feat: add pause modifiers in FleekERC721

* refactor: move functions to the main contract to add pause modifier

* test: add unpause to test setups

* fix: revokeTokenRole modifier

* test: add initial tests and setup for pausable

* test: all test for pause and pausable states

* test: add test for functions when contract is paused

* test: add pausable hardhat tests

* test: foundry access control test for pausable

* refactor: function names

* fix: remove virtual keywords for functions that must not be overriden

* refactor: set inital state for unpaused
2023-02-21 10:56:26 -03:00
Felipe Mendes 197a7a28c5
test: add and change tests to fuzz test (#128) 2023-02-20 11:46:46 -03:00
Felipe Mendes 70e9c14b05
feature: expose last token id function in the contract (#124)
* feat: add function to get the last token id

* test: add getLastTokenId tests
2023-02-20 11:44:59 -03:00
Felipe Mendes a86c30a8da
refactor: make a single event for token metadata changes (#111)
* refactor: add new unified events and remove old multiple ones

* fix: remove indexed from string params on events

* test: add hardhat tests for metadata update changes

* refactor: change event name

* test: add foundry tests for event emits in metadata changes

* refactor: undo changes on accespoint events

* chore: remove subgraph ci tests on prs for develop

* refactor: overload MetadataUpdate event to have multiple type of parameters

---------

Co-authored-by: Shredder <110225819+EmperorOrokuSaki@users.noreply.github.com>
2023-02-17 09:59:55 -03:00
Camila Sosa Morales 04dc4a95c7
chore: mint form (#115)
* wip: form for mint

* style: change bgcolor for disabled button

* fix: add key to list items

* styles: add some spacings and border radius

* refactor: change type file and move file validation to form

* feat: add minted nft card. add wallet step

* refactor: add mint card header to not repeat code

* styles: add border radius to svg

* styles: fix styles on mint view

* style: fix height mint view

* fix: fix save repository config

* chore: changes based on PR review
2023-02-10 17:49:30 -05:00
Shredder 60af583479
feat: expose a function that returns all non-nested values of an App (#119)
* feat: expose a getToken function that returns all non-nested values of an app. Remove the access point mapping in the App struct.

* test: add test for getToken to hardhat

* test: add test cases for getToken (forge tests).

* docs: update header comments for getToken

* fix: apply Zoruka's suggestion

* fix: apply Zoruka's suggestion for expectingRevert

* fix: revert expectRevert
2023-02-11 00:59:25 +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 2adb39641b
feat: new GH action for the subgraph (#120)
* feat: add subgraph unit tests to github action.

* feat: add yarn codegen to the github action.

* feat: create a subgraph action, remove unit testing subgraphs from test action.

* fix: add the location of the contracts.

* chore: remove empty tabs from GH workflow files.

* chore: add path to the subgraph github action and also add build command.

* fix: include a yarn compile step in the subgraph github action.
2023-02-10 22:42:58 +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
Felipe Mendes 18d3319fd7
chore: refactor hardhat tests (#103)
* chore: rearrange hardhat tests folder structure

* chore: add FleekERC721 hardhat test helpers

* test: split out deployment tests

* test: split out minting tests

* test: split out token uri tests

* test: split out token roles tests

* test: split out collection roles tests

* test: split out access points tests

* test: split out update properties tests

* test: improve test setup for aps and deployment

* test: move test resultant base64 logos to constants file
2023-02-09 17:44:57 -03:00