-
Notifications
You must be signed in to change notification settings - Fork 64
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
[WIP] Redesign with registerPILTerms methods #389
base: dev
Are you sure you want to change the base?
Conversation
c729e57
to
32c5f5b
Compare
import { getAddress } from "../utils/utils"; | ||
import { getRevenueShare } from "../utils/licenseTermsHelper"; | ||
|
||
export class PILFlavor { |
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.
lets simplify the names, commercialUse
, nonCommercial
, commercialRemix
, nonCommercialRemix
. I don't think we need the PIL at the end. PILFlavor
class already indicates that.
export type RegisterPILTermsRequest<PILType extends PIL_TYPE> = { | ||
/** The license terms to be registered. */ | ||
terms: | ||
| (PILType extends PIL_TYPE.COMMERCIAL_USE ? CommercialLicenseTerms : never) |
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.
I suggest we simplify this usage. For terms
here, the type can just be PILTermsInput
, which is the same as RegisterPILTermsRequest
from before. PilFlavor.xxx
returns PILTerms
, which should be compatible with PILTermsInput
as PILTermsInput
is just PILTerms
but with some attributes that is now required.
We don't need to allow the user to provide an enum to use a preset.
terms: PILFlavor.commercialUse({
royaltyPolicy: zeroAddress,
defaultMintingFee: 10n,
commercialRevCeiling: 100,
}),
Description
Example:
This pr adds user login function, includes:
Test Plan
Example:
Related Issue
Redesign: license registerPILTerms #385
Notes