Skip to content

Conversation

@pheuberger
Copy link
Member

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.json and promote this out of draft mode.

tnkshuuhei and others added 26 commits February 23, 2025 17:16
- 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
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.
@vercel
Copy link

vercel bot commented Mar 25, 2025

@pheuberger is attempting to deploy a commit to the Hypercerts Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@pheuberger pheuberger closed this Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants