You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the Sendings module created to verify Sendings onchain, this task is to generate the input files for the airdrop and database from the PrivateSale type defined below:
typeAmount=Natural-- Invariants-- Σ percentages = 100%-- Description : Represent Vesting Tranches (Time Sequential and contiguous)newtypeTranches=Tranches (NonEmptyTranche)
dataTranche=Tranche{percentage::Integer-- out of 10,000
, duration::Integer-- number of slots}dataPrivateSale=PrivateSale{start::POSIXTime
, tranches::Tranches
, assetClass::AssetClass
, investors::NonEmptyPrivateInvestor}dataPrivateInvestor=PrivateInvestor{address::Address
, allocation::Amount}
This task is the following:
Create a CLI command that takes a filepath
Decode the file at the path into a PrivateSale (using derived JSON instances), throwing a reasonable error on failure to parse (see Sendings)
Verify the commented requirement on Tranches (Sum of Tranche %'s must be 100% (10,000))
Generate the list of (NativeScript, Integer) pairs for how much of PrivateSale.assetClass to send to each script.
The Scripts are generated like so - For each investor, split the allocation according to the tranches, with unlock time starting at posixTimeToSlot PrivateSale.start + PrivateSale.tranches[0].duration, then adding the duration of each subsequent Tranche to the unlock time.
Use the NativeScript type defined in the database spec:
Example: Say we have tranches: [(50%, 100 slots), (25%, 100 slots), (25%, 200 slots)], with a start time equilalent to slot 1000. For a user with 10000 tokens, we would send 5000 to a script that unlocks at slot 1100, 2500 to one that unlocks at 1200, and 2500 to one that unlocks at 1400.
With the described approach the PrivateInvestor with address 2 would pay its part for every currency of it in the list, is this intended or should I reject such a list? If this is intended, should I merge all the occurrences or just leave them as is (this would impact the Airdrop table output)?
Following the
Sendings
module created to verify Sendings onchain, this task is to generate the input files for the airdrop and database from the PrivateSale type defined below:This task is the following:
(NativeScript, Integer)
pairs for how much ofPrivateSale.assetClass
to send to each script.posixTimeToSlot PrivateSale.start + PrivateSale.tranches[0].duration
, then adding the duration of each subsequent Tranche to the unlock time.NativeScript
type defined in the database spec:[(50%, 100 slots), (25%, 100 slots), (25%, 200 slots)]
, with a start time equilalent to slot 1000. For a user with 10000 tokens, we would send 5000 to a script that unlocks at slot 1100, 2500 to one that unlocks at 1200, and 2500 to one that unlocks at 1400.Map Address [LockedFund]
, defined in the database spec.Create your branch and PR from
mlabs/private-sale-staging
The text was updated successfully, but these errors were encountered: