Commit Graph

9 Commits

Author SHA1 Message Date
Felipe Mendes 83cd36dfc3
feat: design ens verification flow (#193)
* wip: add base solidity functions to try ens validation

* chore: add hardhat fork setup with env variable

* wip: setup ens verification for FleekERC721

* wip: add ens namehash generation

* chore: gas report setting

* feat: add ens verification on setTokenENS function

* test: hardhat transfer ens owner to set new ens

* test: fix foundry tests to enable ens validation

* refactor: change back ens to calldata and split out a public function for namehash testing

* refactor: move FleekENS.sol to util folder

* test: add ens validation tests for not owner attempts

* chore: add mainnet api key env in ci

* chore: fix .env.example

* fix: remove extra unused file
2023-04-05 11:48:56 -03:00
Felipe Mendes 2225b301ff
chore: prevent direct calls to implementation contract (#194)
* feat: disable initializers and set paused state for implementation contracts

* test: add deploy guarantee tests for interaction with implementation contracts

* chore: add buildId and implementationAddress to deployStore script

* test: reset initialized state on store of deployed contract for foundry tests

* test: optmize deployUninitialized function

* test: test if is possible to mint in implementation contract
2023-04-04 16:19:06 -03:00
Felipe Mendes 779cf3bb14
feat: contracts add verified field and allow verifier (#184)
* feat: add token verified flag

* feat: add verified flag on tokenURI

* feat: add isTokenVerified function

* test: add foundry tests for token verified

* test: add hardhat tests for token verified
2023-03-31 16:13:34 -03:00
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
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
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 3e1373682f
test: improve foundry test with best practices (#102)
* test: add FleekERC721 test base mint and uri

* chore: update forge-std version

* test: add FleekERC721 burn tests

* test: fix role getter

* test: add access tests for random address

* test: add access tests for owner address

* test: add test revert assertions

* test: apply revert assertions

* test: remove already split tests

* fix: wrong renamed file

* test: move access point tests

* test: refactor access control tests

* test: add deploy test cases

* test: add balance before and after mint test

* test: remove old testsuit

* chore: update foundry test folder strcture

* test: add assertion to verify added role for random address

* test: fix test functions names

* test: remove test_addAccessPoint

* test: add assertion for appAccessPoints length

* test: remove unnecessary assertions on test_tokenURI

* test: rename test files

* test: refactor testFail to test
2023-02-08 17:27:39 -03:00