Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs(quick start): Add Interacting with a smart contract using Remix #1210

Closed
wants to merge 7 commits into from

Conversation

SimplementeCao
Copy link
Contributor

@SimplementeCao SimplementeCao commented Apr 1, 2024

Description of the Changes

Add a step-by-step on how to interact and deploy a smart contract using the Starknet Remix Plugin. Follow the migration of the Starknet book

Getting Started -> Starknet Documentation - Quick Start

Full issue starknet-edu/starknetbook#352

I suggest placing this tutorial at the end of Quick start senction.

PR Preview URL

Interacting with a smart contract using Remix

Check List

  • Changes have been done against main branch, and PR does not conflict
  • PR title follows the convention: <docs/feat/fix/chore>(optional scope): <description>, e.g: fix: minor typos in code

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


This change is Reviewable

@omarespejel
Copy link
Collaborator

Thank you @LeandroCarvajal for the contribution!

@stoobie, the easiest way to get started with Starknet smart contracts is using Remix, thats why we added this section at the beginning of the SN Book. I recommend adding content on this, such as the one by @LeandroCarvajal, to the beginning of the Docs.

@stoobie
Copy link
Collaborator

stoobie commented Apr 14, 2024

@LeandroCarvajal and @omarespejel This is on my list of to-dos. I apologize for not getting to it more quickly. I'll try to review it in the coming days.

@stoobie stoobie self-requested a review April 14, 2024 14:01
Copy link
Collaborator

@stoobie stoobie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general this content is great!

There are several technical writing guidelines that you (or I) need to implement. A few that jump out are:

  • Use the active/imperative voice instead of the passive.
  • Use simple words wherever possible. For example: use instead of utilize.
  • Let's see if we can avoid using We.

I didn't get very far yet. I'll continue reviewing later.


== Introduction

. Access the https://remix.ethereum.org/#activate=Starknet&lang=en&optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.24+commit.e11b9ed9.js)[Remix IDE] website with the Starknet plugin activated.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the closing parentheses after .js at the end of the URL supposed to be there?

I click on the link, but how do activate the Starknet plugin?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link provided by NethermindEth simplifies the steps by providing the plug-in already activated.

== Introduction

. Access the https://remix.ethereum.org/#activate=Starknet&lang=en&optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.24+commit.e11b9ed9.js)[Remix IDE] website with the Starknet plugin activated.
. Navigate to the `settings` option and opt for the Cairo version, as depicted in the accompanying image. The latest iteration available in Remix is `v2.5.4`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as depicted in the accompanying image.
What image?
The latest iteration available in Remix is v2.5.4.
Remove this. It's going to be obsolete as soon as Remix updates this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You gave me the cue for a doubt that came up, in the original repository screenshots were used, but they were out of context. I'm working on new images to fit the repository.

. Navigate to the `settings` option and opt for the Cairo version, as depicted in the accompanying image. The latest iteration available in Remix is `v2.5.4`.
. Proceed to the `file explorer` tab to review the particulars of the sample project. Within the `Scarb.toml` file, the version of this sample project is delineated.

Given our intent to utilize `version 2.5.4` for this project, it is imperative to ensure its alignment within our `Scarb.toml`. Any disparities should be rectified accordingly, setting `starknet = "2.5.4"`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How many places are there to make sure are aligned?

Does starknet = 2.5.4 refer to the Cairo compiler version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default project is a hello_world, so the folders are modified step by step.

Do you mean the [dependencies]. Is it out of context?

@SimplementeCao
Copy link
Contributor Author

SimplementeCao commented Apr 16, 2024

Thank you very much for the suggestions @stoobie, I am already working to fix it, I am attentive to make the necessary changes.

@SimplementeCao
Copy link
Contributor Author

Hi @stoobie, i've been improving the syntax according to what you suggested, any comments for improvement are welcome, thanks.

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

5 similar comments
@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

Copy link
Collaborator

@stoobie stoobie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimplementeCao Some more comments. I'm still reviewing it.

* Navigate to the `Starknet` tab within Remix, then click on `Home`.
* In the 1 Compile section, choose compile a single file.
* Grant the necessary permissions when prompted. Opt to Remember my choice for smoother processes in the future.
* After compilation, you'll see an "artifacts" directory containing the compiled contract in two formats: Sierra (JSON file) and CASM. For Starknet deployment, Remix will use the Sierra file.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • provide the path to artififacts starting from the root of the project.
  • State the full file names for the Sierra and CASM files.

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

7 similar comments
@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

10 similar comments
@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1210/documentation/ .

@stoobie stoobie mentioned this pull request Jul 9, 2024
2 tasks
@stoobie
Copy link
Collaborator

stoobie commented Jul 9, 2024

Closing this. #1315 replaces this PR.

@stoobie stoobie closed this Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants