lexDAO / Kali

Optimized DAC Protocol
https://kalialpha.vercel.app/
50 stars 14 forks source link

Nit Permit() test #161

Closed audsssy closed 2 years ago

audsssy commented 2 years ago

Context

Screenshot 2022-01-07 215247

KaliDAOtoken.sol - Update input parameter to digest in permit() as nonces[owner]++ throws InvalidSignature()

KaliDAO.test.js

vercel[bot] commented 2 years ago

@audsssy is attempting to deploy a commit to the LexDAO Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/lexdao/kali/F8kycDkzqxWYkEHUzH7yob65SRrp
✅ Preview: https://kali-git-fork-audsssy-nit-permit-test-lexdao.vercel.app

z0r0z commented 2 years ago

good stuff @audsssy why do we think incrementing the nonce outside of digest provides fix here? *Edit -- Also, it is quite strange for test to execute permit, but yet also produce revert.

audsssy commented 2 years ago

Update: Looks like the error was a result of unmatched function name between

(1)

Screenshot 2022-01-08 165221

and

(2)

Screenshot 2022-01-08 164012

Once PERMIT_TYPEHASH in (1) is updated to Permit to match that in (2), the error goes away!

audsssy commented 2 years ago

Update: Looks like the error was a result of unmatched function name between

(1)

Screenshot 2022-01-08 165221

and

(2)

Screenshot 2022-01-08 164012

Once PERMIT_TYPEHASH in (1) is updated to Permit to match that in (2), the error goes away!

audsssy commented 2 years ago

Woot. Thanks for the review and merge!