-
Notifications
You must be signed in to change notification settings - Fork 15
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
hacktivator-program #196
base: main
Are you sure you want to change the base?
hacktivator-program #196
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@EdwinLiavaa is attempting to deploy a commit to the IOV Labs Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EdwinLiavaa Thank you for your contributions, kindly attend to the comments from the PR review.
|
||
### uv | ||
|
||
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a one line sentence of what this does
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uv sync is a fast package management command that downloads and installs your project's Python dependencies while creating a lockfile for reproducible installations.
uv sync | ||
``` | ||
|
||
### pip/python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with here. Add a descriptive title and also why the reader should run the following commands in a short sentence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pip/python section creates a virtual environment (python -m venv ./venv), activates it (source ./venv/bin/activate), and installs the project dependencies from requirements.txt (pip install -r requirements.txt).
echo "source $HOME/.zshenv >> $HOME/.zprofile" | ||
``` | ||
|
||
- Python 3.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I install Python 3? its not clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for this tutorial we will install python3.11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Thank you, kindly include this with the command to install or a link.
Using the pkg: https://www.python.org/downloads/
Alos add that user should install the certificate
Check the python version: which -a python
If there is a way to do this via homebrew for Mac, and others for Windows, also specify: https://www.python.org/downloads/
### pip/python | ||
|
||
```bash | ||
python -m venv ./venv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This throws an error:
python -m venv ./venv
owanate@Owanates-MacBook-Pro Web3py-Vyper-RootStock % python -m venv ./venv
zsh: command not found: python
This probably happened because of my comment above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like Python's venv module is not installed on your system. You are using a MacBook, so You can try fix this by:
Reinstalling Python and make sure to check the option to install pip and venv during installation
Additionally, you should ensure you have Python 3 installed and are using the correct Python command (sometimes it needs to be python3 instead of python).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Cool
This works for me: python3 -m venv ./venv
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
echo "source $HOME/.zshenv >> $HOME/.zprofile" | ||
``` | ||
|
||
- Python 3.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Thank you, kindly include this with the command to install or a link.
Using the pkg: https://www.python.org/downloads/
Alos add that user should install the certificate
Check the python version: which -a python
If there is a way to do this via homebrew for Mac, and others for Windows, also specify: https://www.python.org/downloads/
### pip/python | ||
|
||
```bash | ||
python -m venv ./venv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Cool
This works for me: python3 -m venv ./venv
pip install -r requirements.txt | ||
``` | ||
|
||
## Quickstart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're creating a hello.py file here right? Instead of quickstart, add a descriptive header title
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We run the hello.py Python script as a quick test to verify that our project environment (either with UV or with pip/python virtual environment) is setup properly.
uv run hello.py # for UV | ||
# or | ||
python hello.py # for pip/python | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain in what cases uv or pip should be used and what the command returns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get this when I run the second command:
(venv) owanate@Owanates-MacBook-Pro Web3py-Vyper-RootStock % python3 hello.py
Hello from web3py-Vyper-RootStock!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both uv run hello.py and python hello.py will run the script and output "Hello from web3py-Vyper-RootStock!", with UV being preferred for faster, modern projects and pip for traditional Python setups.
Execute the deployment script: | ||
|
||
```bash | ||
python deploy_favorites_unsafe.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EdwinLiavaa Error when running deployment script:
(venv) owanate@Owanates-MacBook-Pro Web3py-Vyper-RootStock % python3 deploy_favorites_unsafe.py
Traceback (most recent call last):
File "/Users/owanate/Documents/Learning/Web3py-Vyper-RootStock/deploy_favorites_unsafe.py", line 1, in
from web3 import Web3
ModuleNotFoundError: No module named 'web3'
(venv) owanate@Owanates-MacBook-Pro Web3py-Vyper-RootStock %
Also specify troubleshooting options too, its usually a good idea to let the reader know how to solve possible errors they may encounter when running the commands.
E.g, If you get this error: ModuleNotFoundError: No module named 'web3'
Do this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error occurs because the web3 package is not installed in your virtual environment. To fix it, you should run pip install web3 or pip install -r requirements.txt while your virtual environment is activated to install all required dependencies.
sidebar_position: 7 | ||
title: Deploying a Vyper Smart Contract to Rootstock Testnet using Python | ||
description: "This guide walks through the process of deploying a smart contract to the Rootstock testnet using Python and Web3.py. We'll be deploying a simple Vyper contract that demonstrates how to interact with the Rootstock network." | ||
tags: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly check that these tags are enclosed in []
@@ -13,67 +13,75 @@ values={[ | |||
{label: 'Port to Rootstock', value: 'port-dapps'} | |||
]}> | |||
<FilterItem | |||
value="beginner, advanced" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the guide to the quickstart section: https://dev.rootstock.io/developers/quickstart/
Vyper Starter Kit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very well noted. I have incorprated all recommended changes on my local machine. I will now finish the review before I move the guide to the quickstart section accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@owans I have moved guide to quickstart section.
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
Co-authored-by: Owanate Amachree <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have incorprated all recommended changes on my local machine. I will now finish the review before I move the guide to the quickstart section accordingly.
pip install -r requirements.txt | ||
``` | ||
|
||
## Quickstart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We run the hello.py Python script as a quick test to verify that our project environment (either with UV or with pip/python virtual environment) is setup properly.
uv run hello.py # for UV | ||
# or | ||
python hello.py # for pip/python | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both uv run hello.py and python hello.py will run the script and output "Hello from web3py-Vyper-RootStock!", with UV being preferred for faster, modern projects and pip for traditional Python setups.
Execute the deployment script: | ||
|
||
```bash | ||
python deploy_favorites_unsafe.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error occurs because the web3 package is not installed in your virtual environment. To fix it, you should run pip install web3 or pip install -r requirements.txt while your virtual environment is activated to install all required dependencies.
@@ -13,67 +13,75 @@ values={[ | |||
{label: 'Port to Rootstock', value: 'port-dapps'} | |||
]}> | |||
<FilterItem | |||
value="beginner, advanced" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very well noted. I have incorprated all recommended changes on my local machine. I will now finish the review before I move the guide to the quickstart section accordingly.
Title
Description
Screenshots/GIFs
Testing
Checklist
Refs