What the error EditionsMustHaveExactlyOneToken really mean? - solana

I am using web3 to mint NFT on Solana's candy machine v2, followings all the instructions I can find.
using libraries:
#project-serum/anchor": "^0.24.2",
#solana/spl-token": "^0.2.0",
#solana/web3.js": "^1.41.6",
when calling anchor.program.rpc.mintNft(xxxx); got the error
Editions must have exactly one token" string,
which is EditionsMustHaveExactlyOneToken, code is 0X10 from metaplex offical website.
I have spent days, couldn't fiugure out what is wrong. nothing you can find if you google it.
0 "Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ invoke [1]" string
1 "Program log: Instruction: MintNft" string
2 "Program 11111111111111111111111111111111 invoke [2]" string
3 "Program 11111111111111111111111111111111 success" string
4 "Program log: Index is set to 8" string
5 "Program log: Index actually ends up due to used bools 9" string
6 "Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s invoke [2]" string
7 "Program log: Instruction: Create Metadata Accounts v2" string
8 "Program log: Transfer 5616720 lamports to the new account" string
9 "Program 11111111111111111111111111111111 invoke [3]" string
10 "Program 11111111111111111111111111111111 success" string
11 "Program log: Allocate space for the account" string
12 "Program 11111111111111111111111111111111 invoke [3]" string
13 "Program 11111111111111111111111111111111 success" string
14 "Program log: Assign the account to the owning program" string
15 "Program 11111111111111111111111111111111 invoke [3]" string
16 "Program 11111111111111111111111111111111 success" string
17 "Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s consumed 35246 of 1349634 compute units" string
18 "Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s success" string
19 "Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s invoke [2]" string
20 "Program log: V3 Create Master Edition" string
21 "Program log: Editions must have exactly one token" string
22 "Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s consumed 10284 of 1308712 compute units" string
23 "Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s failed: custom program error: 0x10" string
24 "Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ consumed 101572 of 1400000 compute units" string
25 "Program cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ failed: custom program error: 0x10" string

Delete cache file and run this command: ts-node js/packages/cli/src/candy-machine-v2-cli.ts upload -e devnet -k ~/config/solana/devnettest.json -cp config.json -c example assets

Related

How to display both a form and a checklist using dialog tool

Hi I am trying to generate a form in dialog tool that includes both a form and a checklist.
If I put this in a file named form.txt:
--title "New Data"
--form "Data File" 10 100 3
"Name: " 1 1 "" 1 25 40 40
"Reg. Number: " 2 1 "" 2 25 40 40
"ID: " 3 1 "" 3 25 40 40
--checklist "Foo/Bar" 10 100 2
1 "Is foo" OFF
2 "Is bar" OFF
And I invoke dialog using:
dialog --file form.txt
I get both forms sequentially displayed, is there any possibility to display both at the same time (the form above the checklist).
I am using FreeBSD dialog, in case that it is relevant -which I presume it is not-.

How to send emails in Bash with a for loop?

I have three arrays of the same size: outputs as the body of the email, job_id, which is used in the subject, and email with a list of emails.
However, I'm getting an error when I run my script:
email: FATAL: Smtp error: 555 5.5.2 Syntax error.
Is there a way to reference array elements for the email parameter? This code works when I put an actual email, not "${email[$i]}"
for (( i=1;i<${#outputs[#]};i++ )); do
echo "${outputs[$i]}" | email -s "Job #${job_id[$i]} completed" "${email[$i]}"
done

PE file: Debug directory of type IMAGE_DEBUG_TYPE_VC_FEATURE

I compiled a vanilla exe using Visual Studio 2015. Besides the expected debug directory of type IMAGE_DEBUG_TYPE_CODEVIEW, I also found a second one of type IMAGE_DEBUG_TYPE_VC_FEATURE.
I could not find information regarding what data it contains and what it is used for. Could anybody explain or point me to a source explaining it?
when you compile with /GL or link time code generation compilers later than vc 2010 emits an extra debug directory that contains vcfeature these store some counts of pre-vc 110 /GS counts /sdl counts and guardN counts
dumpbin /headers will show the details of this feature 0xc
:\>dir /b
printf.cpp
:\>cat printf.cpp
#include <stdio.h>
void main (void) {
printf("%x\n%d\n%u\n%f\n%g\n%s\n%c\n",256,100,-1,2.2,45.87,"hi",97);
}
:\>cl /Zi /W4 /GL /Ox /analyze /nologo printf.cpp
printf.cpp
Generating code
Finished generating code
:\>dumpbin /headers printf.exe | grep -A 10 "Debug Directories"
Debug Directories
Time Type Size RVA Pointer
-------- ------- -------- -------- --------
5A7F2A78 cv 3C 0004529C 43E9C Format: RSDS, xxx59}, 1, printf.pdb
5A7F2A78 feat 14 000452D8 43ED8 Counts: Pre-VC++ 11.00=0, C/C++=194, /GS=194, /sd
l=0, guardN=193 <<<<<<<<<<<<<
5A7F2A78 coffgrp 28C 000452EC 43EEC 4C544347 (LTCG)
for starters these are all defined in windows headers
13 id == coffgrp as already shown created by lint time code generation
14 is created if you do incremental linking /LINK /LTCG:INCREMENTAL
here is a dummy debug directory
Debug Directories(4)
Type Size Address Pointer
cv 53 463cc 457cc
( 12) 14 46420 45820
( 13) 29c 46434 45834
( 14) 0 0 0
dumpbin /headers pogo_vcfeature.exe | grep -A 8 "Debug Directories"
Debug Directories
Time Type Size RVA Pointer
-------- ------- -------- -------- --------
5AD58258 cv 53 000463CC 457CC
5AD58258 feat 14 00046420 45820
Counts: Pre-VC++ 11.00=0, C/C++=202, /GS=202, /sdl=0, guardN=201
5AD58258 coffgrp 29C 00046434 45834
4C544347 (LTCG)
5AD58258 iltcg 0 00000000 0
windows headers
:\>echo %cd%
C:\Program Files\Windows Kits\10\Include\10.0.16299.0
:\>grep -ir -B 12 -A 4 IMAGE_DEBUG_TYPE_VC_FEATURE *
xxxxxxxxxxxxxx
km/ntimage.h:#define IMAGE_DEBUG_TYPE_VC_FEATURE 12
km/ntimage.h-#define IMAGE_DEBUG_TYPE_POGO 13
km/ntimage.h-#define IMAGE_DEBUG_TYPE_ILTCG 14
km/ntimage.h-#define IMAGE_DEBUG_TYPE_MPX 15
km/ntimage.h-#define IMAGE_DEBUG_TYPE_REPRO 16
--
xxxxxxxxxxxxxxxxx
um/winnt.h:#define IMAGE_DEBUG_TYPE_VC_FEATURE 12
um/winnt.h-#define IMAGE_DEBUG_TYPE_POGO 13
um/winnt.h-#define IMAGE_DEBUG_TYPE_ILTCG 14
um/winnt.h-#define IMAGE_DEBUG_TYPE_MPX 15
um/winnt.h-#define IMAGE_DEBUG_TYPE_REPRO 16
:\>

wsadmin.sh reading multiline commands from stdin

Piped wsadmin can't run scripts with flow control, because in that mode a newline separates commands.
Simple example from http://www-01.ibm.com/support/knowledgecenter/SSEQTP_7.0.0/com.ibm.websphere.base.iseries.doc/info/iseries/ae/cxml_jacl.html?lang=en :
set numbers {1 3 5 7 11 13}
foreach num $numbers {
puts $num
}
output:
[wasuser#oktest-prod-app-2 ~]$ ${WC_WSADMIN:?} -f test.jacl
WASX7209I: Connected to process "dmgr" on node EmProdDmgrNode using SOAP connector; The type of process is: DeploymentManager
1
3
5
7
11
13
[wasuser#oktest-prod-app-2 ~]$ ${WC_WSADMIN:?} <test.jacl
WASX7209I: Connected to process "dmgr" on node EmProdDmgrNode using SOAP connector; The type of process is: DeploymentManager
WASX7029I: For help, enter: "$Help help"
wsadmin>1 3 5 7 11 13
wsadmin>WASX7015E: Exception running command: "foreach num $numbers {"; exception information:
com.ibm.bsf.BSFException: error while eval'ing Jacl expression:
wsadmin>WASX7015E: Exception running command: "puts $num"; exception information:
com.ibm.bsf.BSFException: error while eval'ing Jacl expression:
can't read "num": no such variable
while executing
"puts $num"
wsadmin>WASX7015E: Exception running command: "}"; exception information:
com.ibm.bsf.BSFException: error while eval'ing Jacl expression:
invalid command name "}"
while executing
"}"
My script is generated. Beside storing it in a temporary file is there a workaround? I know it's possible to do this:
foreach num $numbers { puts $num }
but what if there must be more than one command in the block?
Use a semicolon:
foreach num $numbers { puts $num; puts $num }
But you're probably better off writing the script to a temporary file.

How do I fix this BASIC compilation error?

I have a problem compiling a program I made in BASIC. It's a DOS simulator that I was making in attempts to see if it is posssible to write an operating system entirly in BASIC. Every time I try to compile, I get these messages:
!SYNTAX ERROR IN LINE 15, COLUMN 50
UNEXPECTED E
EXPECTING : OR END OF LINE
What do I change to sovle this?
10 PRINT
11 PRINT "Starting..."
12 PRINT
13 PRINT
14 INPUT "Type the location of the Command Interpretter:"; I$
15 IF I$ = "C:\WINDOWS\COMMAND.COM" THEN GOTO 14 ELSE GOTO 13
16 INPUT "C:\>"; D$
17 IF D$ = "FORMAT" GOTO 25
18 IF D$ = "FDISK" GOTO 47
19 IF D$ = "HELP" GOTO 16
20 IF D$ = "DIR" GOTO 16
21 IF D$ = "MKDIR" GOTO 16
22 IF D$ = "WIN" GOTO 16
23 IF D$ = "CD" GOTO 16
24 IF D$ = "DEL" GOTO 16
25 PRINT "WARNING, ALL DATA ON REMOVABLE DISK"
27 PRINT "DRIVE A: WILL BE LOST!"
28 INPUT "Proceed with Format (Y/N)"; F$
29 IF F$ = "Y" THEN GOTO 28
30 IF F$ = "N" THEN GOTO 16
31 PRINT
32 PRINT
33 PRINT
34 PRINT "Fotmatting 1.44MB"
35 PRINT "Format complete."
36 PRINT "Writing out file allocation table"
37 PRINT "Complete."
38 PRINT "Calculating free space (this may take several minutes)...................."
39 PRINT "Complete."
40 PRINT
41 INPUT "Volume Label (11 charchters, ENTER for none)"
42 PRINT
43 PRINT " 1,440MB total disk space"
44 PRINT " 1,440MB available on disk"
45 PRINT
46 PRINT " 512 bytes in each allocation unit."
47 PRINT " 32,624 allocation units available on disk."
48 PRINT "Volume Serial Number is 326A-1312"
49 GOTO 16
50 PRINT "Incorrect DOS Version"
51 PRINT
52 GOTO 16
I used Vintage BASIC 1.0.1 as the compiler. Anyone know what's going on?
Windoze NT
I don't think there is an ELSE keyword in vintage basic, which is why you're getting the unexpected 'E' error.
I assume vintage BASIC is unstructured BASIC, you can refer to the wikipedia article for an example:
http://en.wikipedia.org/wiki/BASIC_programming_language
Also, you have some duplicate line numbers for 26 and 27, which explains the other errors.
The first two warnings are caused by your program having two lines 26, and two lines 27.
I would guess that the third message comes from your BASIC only supporting IF THEN and not IF THEN ELSE. In this case, you can encode it with IF GOTO.
Are you sure your version of BASIC has ELSE? Not all have...
I guess you are learning to program, right? May I ask a question? Why Basic? I think there are a lot of more useful and powerful (and mainly using modern practices of programing) languages to learn that you can use in a graphic OS and they are not more complicated to learn like Python for example (my son has your age and he is loving python). It's a simple language for simple things but very powerful if you need (and complicated too!).
Good luck!
I note that you've changed the code originally posted, deleting the duplicate line numbers That will make the first part of this answer look weird, but I'll leave it.
The compiler is telling you that you're re-using the same line numbers. Notice the following section of code?
26 PRINT "DRIVE A: WILL BE LOST!"
27 INPUT "Proceed with Format (Y/N)"; F$
26 IF F$ = "Y" THEN GOTO 28
27 IF F$ = "N" THEN GOTO 16
The fix is to renumber your lines. Now you know why you don't usually use increments of 1 between lines in languages that require line numbers! (You can likely find - or even write - a tool to do it for you, however.)
Regarding the error from:
15 IF I$ = "C:\WINDOWS\COMMAND.COM" THEN GOTO 14 ELSE GOTO 13
I've not run across "Vintage BASIC" before, but assuming the other answers about it not supporting an else are correct, you'll want something like:
15 IF I$ = "C:\WINDOWS\COMMAND.COM" THEN GOTO 14
16 IF I$ <> "C:\WINDOWS\COMMAND.COM" THEN GOTO 13
You may need to replace "<>" with "!=" or whatever your BASIC uses as a not equal to operator. Also, you'll have to do more renumbering, since you already have a line 16.

Resources