NethermindEth / juno

Starknet client implementation.
https://juno.nethermind.io
Apache License 2.0
371 stars 158 forks source link

Juno @task-5 #1870

Open PsychoPunkSage opened 1 month ago

PsychoPunkSage commented 1 month ago

NOTE: Please don't merge it. It is an exercise PR

PsychoPunkSage commented 1 month ago

Hi @rianhughes I have created a fresh PR for task-5. please have a look here. Thank You

PsychoPunkSage commented 1 month ago

I tried to implement NodesFromRoot Mock... but I'm facing little difficulty in doing so... Can you please have a look at the code and tell me what I'm doing Wrong?? Or what changes I have to make??

rianhughes commented 1 month ago

I tried to implement NodesFromRoot Mock... but I'm facing little difficulty in doing so... Can you please have a look at the code and tell me what I'm doing Wrong?? Or what changes I have to make??

So the code inside the mocks folder is actually autogenerated. You should enter the core directory and run go generate github.com/NethermindEth/juno/core (VSCode also has a "go generate" button on top of the interface definition - I typically just use this). Note you might have to make juno first

PsychoPunkSage commented 1 month ago

I tried to implement NodesFromRoot Mock... but I'm facing little difficulty in doing so... Can you please have a look at the code and tell me what I'm doing Wrong?? Or what changes I have to make??

So the code inside the mocks folder is actually autogenerated. You should enter the core directory and run go generate github.com/NethermindEth/juno/core (VSCode also has a "go generate" button on top of the interface definition - I typically just use this). Note you might have to make juno first

After entering core dir. I ran go generate github.com/NethermindEth/juno/core but i got this error::

state.go:28: running "mockgen": exec: "mockgen": executable file not found in $PATH

I think I need to add binary/.exe file or something to the PATH var.... I am not aware about it... can you tell how to fix this??

Plus, I didn't get the part Make Juno first... What do you mean by that?? I didn't get what I need to do cause I have already build Juno...

PsychoPunkSage commented 6 days ago

Hi @rianhughes I am trying to run the tests but none of them are running... I'm getting this error image