-
Notifications
You must be signed in to change notification settings - Fork 112
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
Premint api helper #276
Conversation
iainnash
commented
Oct 18, 2023
•
edited
Loading
edited
- Remove preminter code from 1155 contracts
- Add a new SDK for preminting to packages
- Cleanup dependencies for 1155 contracts
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…nto prerelease_premint_api_helper
03abe58
to
a4fb8b0
Compare
aa1fe8c
to
aa023d3
Compare
fa29600
to
1863881
Compare
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.
Neat! Concise little API. I’m not too familiar with the feature itself, but the docs and API look good to me.
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.
Nice, this looks great!
A few little nits / questions here and there, but nothing major at all.
maxTokensPerAddress?: bigint; | ||
pricePerToken?: bigint; | ||
mintStart?: bigint; | ||
mintDuration?: bigint; |
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.
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.
}); | ||
} | ||
|
||
const ZORA_API_BASE = "https://api.zora.co/premint/"; |
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.
Have we thought about how we'll handle v1
/v2
versions of premint? Will the API still stay the same?
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.
We probably will need to handle different messages coming back from the server transparently.
…nto prerelease_premint_api_helper
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.
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/premint-sdk/package.json
Outdated
"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", |
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.
this should be:
"@zoralabs/zora-1155-contracts": "*"
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.
Changesets changes this on release.
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
"@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. |
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.
nice changeset!
* Remove preminter code from 1155 contracts * Add a new SDK for preminting to packages * Cleanup dependencies for 1155 contracts