-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
41 lines (35 loc) · 814 Bytes
/
Copy pathindex.js
File metadata and controls
41 lines (35 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const Moralis = require("moralis").default;
const runApp = async () => {
await Moralis.start({
apiKey: "JjKRN1NHgXJyV7AyHMAMcfWJNYGwgda2C7jPjHFIkOqI5cOj3Qtecx9hsSBIExhQ",
// ...and any other configuration
});
const abi = [
{
path: "metadata.json",
content: {
name: "NFT Name",
description: "This will be the NFT description.",
image:
"ipfs://bafybeihewi4brhhmjqvquwdqnlzhnamfh26txwmw2fe4nfswfckpthowna/brandResoursesMage2.svg",
attributes: [
{
trait_type: "Base",
value: "Starfish",
},
{
trait_type: "Eyes",
value: "Big",
},
{
trait_type: "Mouth",
value: "Surprised",
},
],
},
},
];
const response = await Moralis.EvmApi.ipfs.uploadFolder({ abi });
console.log(response.toJSON());
};
runApp();