File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,14 @@ async function main() {
20
20
21
21
for ( const meta of ipfsMetas ) {
22
22
const mintFile = `${ basePath } /build/minted/${ meta . custom_fields . edition } .json` ;
23
-
23
+
24
24
try {
25
25
fs . accessSync ( mintFile ) ;
26
+ const mintedFile = fs . readFileSync ( mintFile )
27
+ if ( mintedFile . length > 0 ) {
28
+ const mintedMeta = JSON . parse ( mintedFile )
29
+ if ( mintedMeta . mintData . response !== "OK" ) throw 'not minted'
30
+ }
26
31
console . log ( `${ meta . name } already minted` ) ;
27
32
} catch ( err ) {
28
33
try {
Original file line number Diff line number Diff line change 1
1
const fetch = require ( "node-fetch" ) ;
2
2
const basePath = process . cwd ( ) ;
3
3
const fs = require ( "fs" ) ;
4
- const readDir = `${ basePath } /build/json` ;
4
+ const readDir = `${ basePath } /build/json` ; // change this directory if you are uploading generic images first in order to do a reveal.
5
5
6
6
const AUTH = 'YOUR API KEY HERE' ;
7
7
const TIMEOUT = 1000 ; // Milliseconds. Extend this if needed to wait for each upload. 1000 = 1 second.
You can’t perform that action at this time.
0 commit comments