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

[WIP] Redesign with registerPILTerms methods #389

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Conversation

bonnie57
Copy link
Collaborator

@bonnie57 bonnie57 commented Jan 23, 2025

Description

Example:
This pr adds user login function, includes:

    1. add user login dpage.
    1. ...

Test Plan

Example:

    1. Use different test accounts for login tests, including correct user names and passwords, and incorrect user names and passwords.
    1. ...

Related Issue

Redesign: license registerPILTerms #385

Notes

  • Example: Links and navigation need to be added to the front-end interface

@github-actions github-actions bot added the enhancement New feature or request label Jan 23, 2025
import { getAddress } from "../utils/utils";
import { getRevenueShare } from "../utils/licenseTermsHelper";

export class PILFlavor {
Copy link
Collaborator

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)
Copy link
Collaborator

@DracoLi DracoLi Jan 23, 2025

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,
      }),

Base automatically changed from v1.3 to dev January 24, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants