-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeta.php
52 lines (36 loc) · 1.46 KB
/
meta.php
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
#!/usr/bin/php
<?php
/**
* metadata generation script,
* Deploy the metadata in a separate IPFS CID
*/
const IPFS_IMG_URL = "ipfs://QmSRQExucEer7jJPFYRSSGUuj85ybX2eWxS7EfaJcA4Ssg/img/";
$dir = __DIR__;
for ($i = 0; $i < 18; $i++) {
$path = $dir . "/docs/meta/" . $i;
`rm -rf $path`;
`mkdir $path`;
}
for ($i = 0; $i < 18; $i++) {
$path_mata = $dir . "/docs/meta/" . $i;
for ($t = 0; $t < 100; $t++) {
$serial = $i.sprintf('%02d', $t);
if ($i === 0) {
$serial = $t;
}
$pageID = $i+1;
$tileID = $t+1;
$obj = new stdClass;
$obj->name = "TheNFT #$serial/1799";
$obj->description = "The SEC issued an 18-page investigative report about TheDAO. The report concluded that, DAO Tokens, a Digital Asset, were securities. Each page of the pdf has been converted into bitmaps, then broken up into 100 tiles.
Each tile is minted as an NFT, with 1 original TheDAO token wrapped inside.
The NFT can be burned to unwrap 1 TheDAO token, which is a 16 decimal ERC20 token, created on Ethereum on Apr 30 2016.
This piece is from page $pageID, tile $tileID (serial numbers start from 0)
More details: thedaonft.eth
(This NFT was minted using the V1 contract and upgraded to V2)
";
$obj->image = "ipfs://QmRX4tA5VtPPvetDdTx9SD9Wm1ty4zzeqHzq4y9guvUHAk/$i/$t.png";
$obj->attributes = [];
file_put_contents("$path_mata/$t.json", json_encode($obj, JSON_PRETTY_PRINT));
}
}