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

Create metadata fee should be calculated (For now it's hard coded) #884

Open
KishiTheMechanic opened this issue Jul 21, 2022 · 1 comment

Comments

@KishiTheMechanic
Copy link
Contributor

// Todo: metadataSize is hardcoded at this moment but should be caliculated in the future.
// On 8.July.2022, Metadata.getMinimumBalanceForRentExemption is returning wrong price.
// const metadataFee = await Metadata.getMinimumBalanceForRentExemption(
// {
// key: Key.MetadataV1,
// updateAuthority: mintAuthority,
// mint: form.mintAccount?.pubkey,
// data: tokenMetadata,
// primarySaleHappened: true,
// isMutable: true,
// tokenStandard: TokenStandard.Fungible,
// uses: null,
// collection: null,
// editionNonce: 255,
// },
// connection.current
// )
const metadataFee = await connection.current.getMinimumBalanceForRentExemption(
679
)

Metadata.getMinimumBalanceForRentExemption is still returning wrong price on 22.July.2022.
I also tried to make Buffer with the params and get length from that but it doesn't have enough length as actual on chain data.

It looks like we need to submit a script to the Metaplex team to reproduce this error and resolve it jointly.

@KishiTheMechanic
Copy link
Contributor Author

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

No branches or pull requests

1 participant