Skip to content
This repository has been archived by the owner on Feb 9, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant