@@ -3,9 +3,12 @@ const path = require("path");
3
3
const basePath = process . cwd ( ) ;
4
4
const fs = require ( "fs" ) ;
5
5
6
- const AUTH = 'YOUR API KEY HERE' ;
7
- const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE' ;
8
- const MINT_TO_ADDRESS = 'YOUR WALLET ADDRESS HERE' ;
6
+ // const AUTH = 'YOUR API KEY HERE';
7
+ // const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';
8
+ // const MINT_TO_ADDRESS = 'YOUR WALLET ADDRESS HERE';
9
+ const AUTH = '7073fd40-9443-4f5f-8eac-ba9030b7051a' ;
10
+ const CONTRACT_ADDRESS = '0x862b11c9d9ed5e566d41ffa848cbcfdefcd183db' ;
11
+ const MINT_TO_ADDRESS = '0xB7422Da1890Ce24309b4670792a1D5E5A6D32F38' ;
9
12
const CHAIN = 'rinkeby' ;
10
13
const TIMEOUT = 1000 ; // Milliseconds. This a timeout for errors only. If there is an error, it will wait then try again. 5000 = 5 seconds.
11
14
@@ -20,11 +23,14 @@ async function main() {
20
23
21
24
for ( const meta of ipfsMetas ) {
22
25
const mintFile = `${ basePath } /build/minted/${ meta . custom_fields . edition } .json` ;
23
-
26
+
24
27
try {
25
28
fs . accessSync ( mintFile ) ;
26
- const meta = JSON . parse ( mintFile )
27
- if ( meta . mintData . response !== "OK" ) throw 'not minted'
29
+ const mintedFile = fs . readFileSync ( mintFile )
30
+ if ( mintedFile . length > 0 ) {
31
+ const mintedMeta = JSON . parse ( mintedFile )
32
+ if ( mintedMeta . mintData . response !== "OK" ) throw 'not minted'
33
+ }
28
34
console . log ( `${ meta . name } already minted` ) ;
29
35
} catch ( err ) {
30
36
try {
0 commit comments