-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add claim airdrop hook app #4897
Add claim airdrop hook app #4897
Conversation
…ook-ui Jean/cow 345 create minimal airdrop hook UI
* fix: aidropHookApp -> move UI components to a separate folder * feat: hook to get user claimable tokens * feat: add COW database url in airdrop hook constants Co-authored-by: Pedro Yves Fracari <[email protected]> * fix: switch name 'link' to 'dataBaseUrl' * feat: (wip) add test function for findIntervalKey * docs: comment findIntervalKeys function in Airdrop hook * fix: typescript issues * feat: add message to the user about claimable tokens status * wip: call isClaimed verification on contract * wip: use preview token output and add airdrop contract hook * feat: add preview of claimable tokens in Airdrop hook * style: add empty line in the end of component files * fix: change token formatting to cow standard * refactor: move dropdownMenu from AidropHookApp/index to components * fix: no more claimable tokens messages when user connects without airdrop selected * wip: review * refactor: add claimed call on the usePreviewTokens * chore: remove duplicated virtual token abi * refactor: transform test script in ts test * refactor: rename preview tokens error variable --------- Co-authored-by: Pedro Yves Fracari <[email protected]> Co-authored-by: Pedro Yves Fracari <[email protected]>
* wip: hook encoding * chore: add airdrop claim hook * wip: add cowshed hooks * refactor: rename components folder to styles * refactor: simplife hooks and fix cow shed init code * refactor: components hook messages and hooks * chore: replace airdrop contract for uniswap interface * fix: airdrop conctract merkle proof --------- Co-authored-by: Jean Neiverth <[email protected]>
* wip: fixing airdrop address * chore: add airdrop abi * fix: use new airdrop contract on useClaimData * chore: remove todo comment --------- Co-authored-by: Jean Neiverth <[email protected]>
Co-authored-by: Pedro Yves Fracari <[email protected]>
@JeanNeiverth is attempting to deploy a commit to the cow Team on Vercel. A member of the Team first needs to authorize it. |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
apps/cowswap-frontend/src/modules/hooksStore/dapps/AirdropHookApp/airdrop.png
Outdated
Show resolved
Hide resolved
apps/cowswap-frontend/src/modules/hooksStore/dapps/AirdropHookApp/constants.ts
Outdated
Show resolved
Hide resolved
apps/cowswap-frontend/src/modules/hooksStore/hooks/useGasLimitHooks.ts
Outdated
Show resolved
Hide resolved
apps/cowswap-frontend/src/modules/hooksStore/hooks/useGasLimitHooks.ts
Outdated
Show resolved
Hide resolved
apps/cowswap-frontend/src/modules/hooksStore/dapps/AirdropHookApp/styled/Input.tsx
Outdated
Show resolved
Hide resolved
I get the same running both |
Hey @JeanNeiverth , great! I've not been able to run all my tests till the end as I don't have a PK of any whitelisted account, but I'd love to have it and check how the balances are changes after a trade is executed.. Anyways, here is the list of issues I've faced today:
Thanks |
Hi @elena-zh, thank you for your feedbacks! I made some changes and will try to answer each point you brought. First of all, we decided during some discussions of this PR that now we will have one hook per airdrop, which means we won't have the airdrop dropdown selector anymore. I apologize for not updating the PR description right after we took this decision.
By the way, we've been working from a specific UI design (Link here). Could you confirm if your team has had a chance to review it? If not, how could we make this easier for you? Please feel free to take another look in the new hook and tell us if there are other points to change, |
Hey @JeanNeiverth , thank you for clarifications and fixes! Still, I have some issues to report :)
I'm thinking that it would be great to protect users from stupid actions resulting in paying twice for the same transactions.
For me, personally, it is important to show a user an amount to claim and then to swap, if needed. Thank you! |
Hey @elena-zh . I think that you are not using the latest version. I am not sure if you are running locally or approving the deployments, but since we will start to open some PRs I am wondering if we could have authorization for the CI deployment cc @shoom3301 @fairlighteth |
@elena-zh
So mainly, those questions are about hooks ordering and hooks influence on the order parameters.
First one mainly is supposed to be done by a person with some technical knowledge. Answering on your question - for now we should keep it as it is |
We have been discussing this with @fairlighteth , it supposed to be displayed as a standardized list of results, like:
@elena-zh this is out of this task scope, we will work on it later |
@yvesfracari , @shoom3301 for clarifications. I've been able to run the full airdrop flow! Works great! Some issues that I can still see: |
@elena-zh Thanks again for your careful review!
Please note that you will probably not be able to run the latest versions until another deploy, but you can take a look here:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fixes and explanation. Approved!
…actoring-based-on-designs
Hey @shoom3301 @alfetopito, just to say I had to merge develop into my branch to resolve some conflicts. Now, I would like to kindly ask you guys to deploy again xD, so we can merge the PR. |
Now lint is complaining 🙈 |
Summary
To Test
/#/11155111/swap/hooks/WETH
Connect your wallet and switch to Sepolia Network
Click 'Add PreHook action' > 'Claim Airdrop' and test the app
If your wallet is in this csv you should be able to see your claimable tokens. Else, you will probably get the message 'No tokens to claim'