Skip to content
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

How splitFraction works #29

Open
positonic opened this issue Apr 29, 2024 · 0 comments
Open

How splitFraction works #29

positonic opened this issue Apr 29, 2024 · 0 comments
Assignees

Comments

@positonic
Copy link
Member

positonic commented Apr 29, 2024

It was pretty tricky to figure out how this works, so I've documented it here:

  1. Mint a hypercert to myself
  2. Call splitFraction (MyAddress, 0x100000000000000000000000000000001, [50,50])
  3. unitsOf (MyAddress, 0x100000000000000000000000000000001) = 50
  4. unitsOf (MyAddress, 0x100000000000000000000000000000002) = 50
  5. Call splitFraction (AnotherAddress, 0x100000000000000000000000000000001, [30,20])
  6. unitsOf (MyAddress, 0x100000000000000000000000000000001) = 30
  7. unitsOf (MyAddress, 0x100000000000000000000000000000003) = 20
  8. I then mint a 2nd Hypercert - it's id becomes 0x200000000000000000000000000000001
@positonic positonic self-assigned this May 6, 2024
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

No branches or pull requests

1 participant