-
Notifications
You must be signed in to change notification settings - Fork 6
/
NFTs.con
54 lines (45 loc) · 2.43 KB
/
NFTs.con
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
42
43
44
45
46
47
48
49
50
51
52
53
54
;; Script to create NFTs and put it for sale on the shop.
;;
;; https://tweegeemee.com/top10?days=365
;; Name + URI + description
(def images
[["Concentricity" "https://pbs.twimg.com/media/EXUWTWxXQAENFf5.png" "Concentricity"]
["Skylight" "https://pbs.twimg.com/media/EgxecvGXkAIvQsK.png" "Skylight"]
["Jelly Nightmare" "https://pbs.twimg.com/media/EbZs457WkAAY_Qw.png" "Jelly Nightmare"]
["Inner Peace" "https://pbs.twimg.com/media/EqOk8H4UcAA9BtH.png" "Inner Peace"]
["5D Chess" "https://pbs.twimg.com/media/Ejrfz84UYAAgw9X.png" "5D Chess"]
["Continent of Colour" "https://pbs.twimg.com/media/EfPoWfoXYAIWW5S.png" "Continent of Colour"]
["Northern Lights" "https://pbs.twimg.com/media/ErRFr8XXIAA09Ae.png" "Northern Lights"]
["Malbolge" "https://pbs.twimg.com/media/Eo65QdSXMAA4AlF.png" "Malbolge"]
["Crazy 77" "https://pbs.twimg.com/media/ExTxHhdXAAAMi6Q.png" "Crazy 77"]
["Geometrica" "https://pbs.twimg.com/media/EoW00ZsWMAE4qYf.png" "Geometrica"]
["Mitosis" "https://pbs.twimg.com/media/Ez95yvqVgAAIJx3.png" "Mitosis"]
["The Beginning" "https://pbs.twimg.com/media/Ez95urjXoAAk-rF.png" "The Beginning"]
["Hyperbole" "https://pbs.twimg.com/media/Ez9sswuXEAMBXPl.png" "Hyperbole"]
["Swarm of Dust" "https://pbs.twimg.com/media/Ez8npy3XMAAS6XW.png" "Swarm of Dust"]
["Black Mass" "https://pbs.twimg.com/media/Ez6QttaXEAQv6vO.png" "Black Mass"]
["Perlin's Brain" "https://pbs.twimg.com/media/Ez5pBZRXIAI4w5L.png" "Perlin's Brain"]
["Sandscape" "https://pbs.twimg.com/media/Ez0CGgHWYAAs7v2.png" "Sandscape"]
["Perspective" "https://pbs.twimg.com/media/EzvUEWUXIAMFVP0.png" "Perspective"]])
(import asset.nft.tokens :as nft)
(import currency.USD :as USD)
;; This addreess is unlikely to change.
(def NFT-actor-address nft)
;; This address changes whenever we reset the database and deploy a new Actor.
(def shop-actor-address #108)
(def NFTs
(map
(fn [[name uri _]]
(call NFT-actor-address (create-token {:name name :uri uri} nil)))
images))
(import convex.asset :as asset)
(def listings
(map
(fn [token-id [name uri description]]
(do
(asset/offer shop-actor-address [NFT-actor-address token-id])
(call shop-actor-address (add-listing {:description description
:image uri
:asset [NFT-actor-address token-id]
:price [1000 USD]}))))
NFTs images))