starknet-io / starknet-docs

The repo for Starknet's developer documentation. Includes contribution guidelines and the Starknet documentation supplementary style guide
https://docs.starknet.io/
112 stars 159 forks source link

Docs(quick start): Add Tutorial using katana devnet #1191

Open gianalarcon opened 3 months ago

gianalarcon commented 3 months ago

Description of the Changes

Add tutorial of how declare, deploy and interact with a sample smart contract using katana devnet. Follow migration of Starknet book

2.2.1 Katana Scarb and Starkli -> Starknet Documentation - Setting up your environment

Full issue here

I suggest to land this tutorial at the end of Quick start section.

PR Preview URL

https://starknet-io.github.io/starknet-docs/pr-1191/documentation/quick_start/katana_devnet/

Check List

This PR depends on the following PR-24

@omarespejel Please have a look here. Thanks @stoobie I would like your feedback here as well. Thanks


This change is Reviewable

gianalarcon commented 2 months ago

@omarespejel @stoobie Ready for review. Thanks

stoobie commented 2 months ago

@gianalarcon Thank you for your contribution. After I started reviewing this PR, I found that starknet-devnet-rs is the most full-featured devnet. I haven't actually run starknet-devnet-rs, but it appears to me that you could very easily make some minor changes to this tutorial to use starknet-devnet-rs, or even to make it work with both starknet-devnet-rs and Katana. WDYT?

gianalarcon commented 2 months ago

I left some comments before I realized that we should either focus on, or at the very least, include, starknet-devnet-rs in this tutorial.

So keep that in mind before you spend time implementing my comments. I'm discussing this with our Dev Tools expert early next week and then I'll know more.

Hi @stoobie. Thank you so much for your review! If we want to use starknet-devnet-rs, I suggest to use with foundry-rs, since it uses starknet-devnet under the hood. At the end I would like to make it work with both of them, foundry-rs(starknet-devnet-rs) and Katana.

Sure I will wait for the result of the discussion with your Dev Tools expert

omarespejel commented 2 months ago

Thank you @gianalarcon for the contribution!

@stoobie, for what is worth, I agree with using primarly foundry-rs (starknet-devnet-rs) and having an additional (optional) section on Katana substituting foundry-rs, since it is also very used by the community.

stoobie commented 2 months ago

@gianalarcon @omarespejel I talked with @amanusk, and it's like we discussed above: It's not a problem to include Katana together with starknet-devnet-rs, but not alone.

So in order to publish, we need to have info for starknet-devnet-rs.

@gianalarcon:

  1. Are you saying that starknet-devnet-rs can be used only with Foundry?
  2. Can you add the necessary info for starknet-devnet-rs? I will do my best to prioritize reviewing/editing the PR once you add that info.
gianalarcon commented 2 months ago

@gianalarcon @omarespejel I talked with @amanusk, and it's like we discussed above: It's not a problem to include Katana together with starknet-devnet-rs, but not alone.

So in order to publish, we need to have info for starknet-devnet-rs.

@gianalarcon:

  1. Are you saying that starknet-devnet-rs can be used only with Foundry?
  2. Can you add the necessary info for starknet-devnet-rs? I will do my best to prioritize reviewing/editing the PR once you add that info.

That is great. It is ok, we can include both Katana together with starknet-devnet-rs

  1. Actually starknet-devnet-rs can be used without Foundry but you have to setup too many things and the developer experience becomes really complex.
  2. On the other hand, Foundry-rs handle all of this for you. It makes developer experience a lot better./easier That's why I suggest to use Foundry and we can explain it uses starknet-devnet-rs as a localhost.

I will start fixing the content for Katana in this PR? Then I can open a new/different PR for a tutorial with Foundry-rs(starknet-devnet-rs)

gianalarcon commented 2 months ago

PR ready for review @stoobie . Foundry-rs(starknet-devnet-rs) not included in this PR.