This project is a port of the contracts from Func NFT TEP-62 & supporting TEP-66. contract works identically to the reference FunC implementation in https://github.com/ton-blockchain/token-contract/tree/main/nft.
First, let's install all the dependencies:
yarn install
Now we're ready to build our contract:
yarn build
Once you've built our contract, you can deploy it:
yarn deploy
Let's look at some other useful commands.
To test TACT contracts run:
yarn test
If you want to quickly check your changes for validity, run:
yarn lint
To deploy a NFT collection follow some instructions in contract.deploy.ts
and define in .env
values:
MNEMONICS
if nft collection have Off-chain data :COLLECTION_LINK
( collection metadata )COMMON_LINK
then
yarn deploy
To deploy NFT Item follow some instructions in contract.deploy_nft.ts
and define in .env
COLLECTION_ADDRESS
then
yarn deploynft
To batch NFT follow instructions in contract.deploy_nft.ts
then
yarn batchdeploynft
Test TACT contracts with /ouput/ folder, test func contracts with /output_func/ contracts in
P.S. or just replace output/NFT
with output_func/NFT
in all files except README
And then
yarn test
- Use ^Struct in future versions of tact
- Use opcode with deploying NFT
- If we can check some conditionals after loadData(), in our case it is in NFTItem owner != null
- Using TupleBool
- Either type in TACT
- With another way to use addr_none$00 in tact we can delete ? in responceDestination var
- Get nextItemIndex in hashmap, not deleteGetMin
- Send excess message after nft deploy to notify new owner ( how in transfer )
Code with some of this opportunities in tact-standard
branch, this code have another exitCodes but same core functionality, it can batch deploy
btw new code can batch deploy 142 items in 1.6 dev tact vs 130 on func originals