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

Fail with generating upgradable NFTs #4

Open
sepezho opened this issue May 10, 2022 · 0 comments
Open

Fail with generating upgradable NFTs #4

sepezho opened this issue May 10, 2022 · 0 comments

Comments

@sepezho
Copy link

sepezho commented May 10, 2022

So, as i understand i should use nft-item-editable-DRAFT.fc contract for minting editable NFTs. After setup everything and compile this code i had "B5EE9C724102********00CB5C98" HEX output. When i tried to create NFT collection with this contract and mint NFTs via this stuff i get just kinda broken tokens. If i will go to the testnet.tonscan.org and find those addresses i will see just not initialized contracts

Code that i use to create nft collection:

const nftCollection = new NftCollection(tonweb.provider, {
ownerAddress: walletAddress,
royalty: 0.05,
royaltyAddress: rwalletAddress,
collectionContentUri: "https://gateway.pinata.cloud/ipfs/QmcdLkYQAUTnwvN1*******ByQVs",
nftItemContentBaseUri: "https://gateway.pinata.cloud/ipfs/QmWpqAmKt3zkejfrUBFBT******HLy/",
nftItemCodeHex: "B5EE9C724102********00CB5C98",
});

Code for NFTs mint:

const item = await nftCollection.createMintBody({
	amount,
	itemIndex: itemNumber,
	itemOwnerAddress: wallet2add,
	itemContentUri: metaHash,
});

const nftCollectionAddress = await nftCollection.getAddress();

console.log(
	await wallet.methods
		.transfer({
			secretKey: mintSecretKey,
			toAddress: nftCollectionAddress.toString(true, true, true),
			amount: amount,
			seqno: seqno,
			payload: item,
			sendMode: 3,
		})
		.send()
);
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