6529-Collections / nftdelegation

Delegation contract
MIT License
16 stars 7 forks source link

Add tests & simplify logic #3

Closed scooprinder closed 1 year ago

scooprinder commented 1 year ago

I agree with the comments made in 1 and as such haven't made any modifications to errors or syntax.

Simplified the logic for the register / revoke functions, though upon further reflection these could be improved further (perhaps with different storage layouts). Knocked off around 45k gas from register and around 10k gas from revoke.

I added some simple forge tests to cover the base use cases and found the following issues:

The code in this PR isn't perfect either (only had a little bit of time) but I think some more fundamental changes are required - I'm submitting it because it could be some help but no drama if it isn't.

scooprinder commented 1 year ago

Apologies for the delay @rookmate - I appreciate your feedback; are these tests still wanted? I can tidy the PR up this week if so.

rookmate commented 1 year ago

Apologies for the delay @rookmate - I appreciate your feedback; are these tests still wanted? I can tidy the PR up this week if so.

Hey mate! Me and @brookr from PR #19 really want it! :pray: Although we're waiting for the repo owner to come alive and also provide feedback in the PRs...

I just noticed they did more than a few changes a few days ago :thinking: If I get some time this week I'll do another pass on the open PRs

a2rocket commented 1 year ago

outdated PR