-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add Premint api js #271
Add Premint api js #271
Conversation
please also export this api in other api methods that would be useful:
|
network: NetworkConfig; | ||
chain: Chain; | ||
mintFee: BigInt; | ||
constructor(chain: Chain) { |
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.
thoughts on just taking a chainId
instead of requiring a full chain
?
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.
Full chain
is needed in a few cases for viem to lazy-create a publicClient.
return await response.json(); | ||
} | ||
|
||
async post(path: string, data: any) { |
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.
minor, but this should be extracted to a static function outside the class since it doesn't have any dependency on this
, same as above with get
. would clean up the api definition too
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 want to allow this to be easily overridable
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.
what's the reason for someone wanting to override this?
return await response.json(); | ||
} | ||
|
||
async createPremint({ |
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.
if this is a premint for a new contract, the account address must match the contractAdmin.
* Add ERC7572 support for opensea. * add changesset * fix tests * fix lint
No description provided.