-
Notifications
You must be signed in to change notification settings - Fork 4
Safe support to claim a hypercert #495
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
Closed
pheuberger
wants to merge
26
commits into
hypercerts-org:main
from
pheuberger:safe-support-claim-hypercert
Closed
Safe support to claim a hypercert #495
pheuberger
wants to merge
26
commits into
hypercerts-org:main
from
pheuberger:safe-support-claim-hypercert
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add a 'Delete' button for the created/uploaded allowlist - When the allow list is provided via manual creation, disable the URL input
When an URL was input, allow for editing the allowlist in the creation modal.
onChange will handle the validation for provided link, and if validation is succeeded, call form.setValue("allowlistEntries", ...) to update allowlist data
Added a new function to fetch and parse allowlist data from a provided URL. The function validates the URL, checks the content type, and processes CSV or plain text files. If the data is valid, it updates the form with the allowlist entries. Enhanced the UI with a 'Fetch URL' button to trigger this functionality.
Improved the allowlist entry validation and scaling logic by calculating total units and proportionally scaling each entry's units based on the total.
change intended to allow user to edit allowlist on dialog if user uploaded via url. if user updated allowlist, then delete original url to avoid confliction in a minting process
Updated the allowlist entry calculations to explicitly convert units to BigInt before processing. This change improves the accuracy of percentage calculations displayed in the minting form.
- put all buttons below the URL - rename: Reset -> Delete - rename: Fetch URL -> Import from URL
Extracted the allowlist fetching and parsing logic into a separate function
changes: - split parseAllowList and forocused it to parse only. - Add to throw errors.
- Implemented tests to validate the parsing of allowlist CSV files with various delimiters (comma, semicolon). - Added checks for correct handling of rounding errors and invalid Ethereum addresses. - Ensured that empty lines in the CSV are ignored and that the total units match the expected DEFAULT_NUM_UNITS.
The TODOs were actually part of a WIP commit, but were not thrown out as intended after finishing the implementation.
Since it's already available in the scope, why not use it?
This feels like a reusable component but it's not. Let's improve it!
When viewing the profile of a smart contract address, there is a non-zero chance that the ownership across different networks varies. This could be exploitet, so it's best to prompt the users to do their own research.
…ist-creation-improvements feat: allowlist creation improvements
…ning-banner-from-main Sync main -> dev
Without this patch the user can only mint a Hypercert with their connected browser wallet. By passing the Safe address into the SDK function the Safe flow is invoked. The minting dialog now shows fewer steps and proposes a Safe transaction on successful signature.
It's not leading to an error, but it shouldn't be there anyway.
…percert-minting Safe support for minting a Hypercert
Without this patch multisigs that have Hypercerts to be claimed have no straightforward way of claiming them. This patch introduces the same patterns as used for minting a Hypercert from a Safe.
When disconnected the button was showing "Switch chain". Now it shows "Claim" and only an outline. It's disabled as well until the user connects their wallet.
|
@pheuberger is attempting to deploy a commit to the Hypercerts Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is in draft as I'm waiting to merge hypercerts-org/hypercerts-sdk#38. If that's done I'll update the SDK version in
package.jsonand promote this out of draft mode.