(api, alice)
| 28 | } |
| 29 | |
| 30 | async function createCollectionAsync(api, alice) { |
| 31 | // Test NFT |
| 32 | const name = [0x54, 0x65, 0x73, 0x74, 0x20, 0x4e, 0x46, 0x54]; |
| 33 | // Test NFT Collection |
| 34 | const description = [0x54, 0x65, 0x73, 0x74, 0x20, 0x4e, 0x46, 0x54, 0x20, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e]; |
| 35 | // TestNFT |
| 36 | const tokenPrefix = [0x54, 0x65, 0x73, 0x74, 0x4e, 0x46, 0x54]; |
| 37 | |
| 38 | // Mode: NFT |
| 39 | const tx = api.tx.nft.createCollection(name, description, tokenPrefix, {"NFT": config.collectionDataSize}); |
| 40 | await submitTransaction(alice, tx); |
| 41 | |
| 42 | const collectionId = 1; |
| 43 | |
| 44 | const tx2 = api.tx.nft.setOffchainSchema(collectionId, "https://ipfs-gateway.usetech.com/ipfs/QmVdFFZjnq6i3fNDjm6FQe2tfAtUDnqMNkBh8e4sYWUmbH/images/image{id}.png"); |
| 45 | await submitTransaction(alice, tx2); |
| 46 | } |
| 47 | |
| 48 | async function main() { |
| 49 | // Initialise the provider to connect to the node |
no test coverage detected