1

I'm trying to initialize the storage of the record through the command line. I'm trying different variations of: "ligo compile-storage college.religo main 4 Adam 1600" For a record called applicant with a return of: Invalid command line argument. The provided storage does not have the correct type for the contract. in file "college.religo", line 21, character 11 to line 30, character 1 Invalid type(s). Expected: "record[gpa -> int , name -> string , satscore -> int]", but got: "int".

So, when I input: ligo compile-storage college.religo main record[gpa -> 4 , name -> Adam , satscore -> 1600] I get back: zsh: bad pattern: [gpa

This is the Usage: ligo compile-storage [OPTION]... SOURCE_FILE ENTRY_POINT STORAGE_EXPRESSION

Any help would be greatly appreciated.

All the best - Adam

  • Can you give the type of your storage, or if possible, a link to the full source code of the contract? – arvidj Oct 6 at 9:45
  • Hi Arvidj, Thank you so much for taking the time to help me. This is it: gitlab.com/adamshinder/first-dapp I found that the correct syntax is: ligo compile-storage college.religo main {gpa:0 , satscore:0, name:”” } but it still doesn’t initialize the storage to those values. This is the error message I receive, ligo: too many arguments, don't know what to do with 'satscore:0', 'gpa:0' In the ide.ligolang.org, {name:"",satscore:0, gpa:0} this worked as a parameter when running a dry-run, for a friend of mine but not on my IDE. I’m still having trouble initializing a value. – Adam Shinder Oct 6 at 11:33
  • 1
    Have you tried ligo compile-storage college.religo main '{gpa:0 , satscore:0, name:"" }' ? I.e. putting the value of the storage in quotes. – arvidj Oct 6 at 14:50
  • It worked!! Thank you so much. I really appreciate the help!! – Adam Shinder Oct 8 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.