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

Premint api helper #276

Merged
merged 42 commits into from
Oct 30, 2023
Merged

Premint api helper #276

merged 42 commits into from
Oct 30, 2023

Conversation

iainnash
Copy link
Collaborator

@iainnash iainnash commented Oct 18, 2023

  • Remove preminter code from 1155 contracts
  • Add a new SDK for preminting to packages
  • Cleanup dependencies for 1155 contracts

@iainnash iainnash force-pushed the prerelease_premint_api_helper branch from 03abe58 to a4fb8b0 Compare October 19, 2023 18:36
@iainnash iainnash force-pushed the prerelease_premint_api_helper branch from aa1fe8c to aa023d3 Compare October 20, 2023 03:43
@iainnash iainnash force-pushed the prerelease_premint_api_helper branch from fa29600 to 1863881 Compare October 20, 2023 18:40
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Copy link

@margalit margalit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! Concise little API. I’m not too familiar with the feature itself, but the docs and API look good to me.

Copy link
Contributor

@kolber kolber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this looks great!
A few little nits / questions here and there, but nothing major at all.

packages/premint-sdk/src/premint-api.test.ts Outdated Show resolved Hide resolved
packages/premint-sdk/src/premint-api.test.ts Outdated Show resolved Hide resolved
packages/premint-sdk/src/premint-api.test.ts Outdated Show resolved Hide resolved
packages/premint-sdk/src/premint-api.test.ts Outdated Show resolved Hide resolved
packages/premint-sdk/src/premint-api.test.ts Outdated Show resolved Hide resolved
maxTokensPerAddress?: bigint;
pricePerToken?: bigint;
mintStart?: bigint;
mintDuration?: bigint;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've added a local validation here to ensure it's not accidentally sent in ms (very common mistake). Might be nice here too if we can find a way to do it.

packages/premint-sdk/src/premint-api.ts Outdated Show resolved Hide resolved
packages/premint-sdk/src/premint-api.ts Outdated Show resolved Hide resolved
packages/premint-sdk/src/premint-api.ts Outdated Show resolved Hide resolved
});
}

const ZORA_API_BASE = "https://api.zora.co/premint/";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we thought about how we'll handle v1/v2 versions of premint? Will the API still stay the same?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably will need to handle different messages coming back from the server transparently.

@iainnash iainnash requested a review from oveddan October 26, 2023 17:31
Copy link
Collaborator

@oveddan oveddan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks super awesome! great work. minor suggestions but not dealbreakers, feel free to merge and we can always do those improvements in future prs

packages/1155-contracts/package.json Show resolved Hide resolved
packages/1155-contracts/CHANGELOG.md Outdated Show resolved Hide resolved
packages/premint-sdk/src/http-api-base.ts Show resolved Hide resolved
packages/premint-sdk/src/premint-client.test.ts Outdated Show resolved Hide resolved
packages/premint-sdk/src/index.ts Outdated Show resolved Hide resolved
"anvil": "source .env.anvil && anvil --fork-url $FORK_RPC_URL --fork-block-number $FORK_BLOCK_NUMBER --chain-id 31337"
},
"dependencies": {
"@zoralabs/zora-1155-contracts": "2.1.1-premint-api.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be:
"@zoralabs/zora-1155-contracts": "*"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changesets changes this on release.

@oveddan
Copy link
Collaborator

oveddan commented Oct 26, 2023

@oveddan oveddan mentioned this pull request Oct 27, 2023
"@zoralabs/premint-sdk": minor
---

Added new premint api that abstracts out calls to the chain signature and submission logic around submitting a premint. This change also incorporates test helpers for premints and introduces docs and an api client for the zora api's premint module.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice changeset!

@iainnash
Copy link
Collaborator Author

iainnash commented Oct 30, 2023

Merge activity

@iainnash iainnash merged commit cf3be8f into main Oct 30, 2023
iainnash added a commit that referenced this pull request Jan 11, 2024
* Remove preminter code from 1155 contracts
* Add a new SDK for preminting to packages
* Cleanup dependencies for 1155 contracts
@iainnash iainnash deleted the prerelease_premint_api_helper branch January 11, 2024 15:37
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.

5 participants