-1

I am following the Substrate Kitties tutorial. I added a map & compiled. no errors. but when I look for the module in extrinsic app, I don't see it. I am running the build.sh, then cargo build release, then starting the node after using purge--chain flag.

Any ideas ?

Mahesh
  • 1
  • 1
    If you don't show your code and error messages, all we can do is guess. Check carefully if you made a dumb mistake, read and understand the messages you get. Take a look at the [guide to asking questions](http://www.catb.org/~esr/faqs/smart-questions.html). – vonbrand Feb 21 '20 at 21:25

1 Answers1

0

I figured it. The function defined in decl_module! macro was not public. forgot to add the "pub" keyword to my function.

Mahesh
  • 1
  • This is definitely not the solution to your problem. The more likely issue is that you just need to refresh the UI. – Shawn Tabrizi Feb 22 '20 at 12:02
  • I refreshed UI many times. then used build.sh, then cargo build release, then starting the node after using purge--chain flag. my substrate node is version 1.0.0-510961d-x86_64-macos But after making the functions public, the module showed up. I am sure you are right, you know better. – Mahesh Feb 22 '20 at 18:28
  • Adding `pub` to an extrinsic function will only make it "public" in the rust sense. As in you would be able to reference the function from another part of your code. The dispatch logic and metadata which exposes your runtime function is unaffected by the `pub`. – Shawn Tabrizi Feb 22 '20 at 21:16