You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 🚩 Let's build an NFT marketplace with Algorand Python!
4
4
5
-
연세대 BAY X 알고랜드 개발자 세션에 오신 베이 학회원분들 반갑습니다~!
5
+
Welcome to your first step to become a master in Algorand Python!
6
6
7
-
알고랜드 개발자 기초개념 및 스마트 계약에 관한 모든 것 👉 [PPT 슬라이드](https://docs.google.com/presentation/d/1I-lxxAkNIRoR9VdDX-wRD68hHuxBvI1uPY-VQlmrgiI/edit?usp=sharing)
7
+
In this AlgoKit workspace, there are 2 sub projects:
8
8
9
-
이번 코딩 세션에서는 다음과 같은 NFT 마켓플레이스 스마트 계약을 [알고랜드 파이썬](https://algorandfoundation.github.io/puya/index.html)을 사용해서 구현해보겠습니다.
9
+
-`python-demo`
10
+
-`coding-assignment`
10
11
11
-
NftMarketplace 앱 설명
12
+
You can see a fully implemented personal bank smart contract written in Algorand Python in the `python-demo` project folder.
12
13
13
-
이 간단한 NftMarketplace 앱은 에섯(ASA)를 판매할 수 있는 스마트 계약입니다.
14
+
In the `coding-assignment` project folder, we will implement an NFT marketplace smart contract with [Algorand Python](https://algorandfoundation.github.io/puya/index.html)
4. 열람 후 `python-decipher2024.code-workspace` 파일을 열람 후 `open workspace` 버튼을 눌러 workspace 모드를 실행시켜주세요.
47
-
5. 이제 VSCode 터미널이 3개가 자동 생성될 것 입니다: `ROOT``python-decipher2024``coding-assignment`. 이 중 `ROOT` VSCode 터미널에서 `algokit project bootstrap all` 커맨드를 실행시켜 dependencies들을 설치해주세요. 이러면 모든 프로젝트 폴더의 dependencies들이 설치됩니다.
48
-
> 만약 3개의 터미널의 자동으로 열리지 않으면 새로운 터미널을 + 버튼을 눌러 만들고 `ROOT`를 선택하시면 됩니다.
55
+
56
+
1. Open this project in VSCode
57
+
2. Open the file named `python-decipher2024.code-workspace` and press the `open workspace` button to activate workspace mode.
58
+
3. 3 VSCode terminal will be auto created: `ROOT``python-demo``coding-assignment`. Now go to the `ROOT` VSCode terminal and run the following command to install dependencies required for both sub projects:
> If the 3 terminals don't open automatically, Press the `+` button and select `ROOT` in VSCode.
65
+
66
+
> If you get `Unhandled PermissionError: [Errno 13] Permission denied: '/Users/$name/.config/algokit'` error, add `sudo` in the front and run the following command:
67
+
68
+
```bash
69
+
sudo algokit project bootstrap all
70
+
```
71
+
72
+
1. Now go to the `coding-assignment` terminal and run the following command to activate the Python virtual environment:
55
73
56
-
6. 이제 `coding-assignment` 터미널을 선택한 뒤 `poetry shell` 커맨드를 실행해 파이썬 virtual environment를 활성화 시켜주세요.
2. venv를 활성화 한 뒤 `pip list`를 실행해서 `algorand-python` 및 여러 dependencies들이 나오면 성공적으로 가상환경을 활성화 시킨겁니다.
74
+
```bash
75
+
poetry shell
76
+
```
59
77
60
-
🎉 이제 모든 준비가 되었습니다! Good luck coding! 💻
78
+
- To deactivate the Python virtual environment, run `exit` in the terminal.
79
+
- After activating the venv, run the following command and if you see various dependencies including `algorand-python`, you successfully activate the virtual environment!
61
80
62
-
리포 fork, clone 튜토리얼:
81
+
```bash
82
+
pip list
83
+
```
84
+
85
+
🎉 Now you are ready to crack this assignment! Good luck coding! 💻
This coding assignment consist of **4 problems** in total. Follow the instructions below!
93
+
94
+
### Launch localnet
95
+
96
+
1.**_Open Docker Desktop first_** and then run the following command in your terminal to launch the local network. [Click me for more information of localnet!](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/localnet.md#creating--starting-the-localnet)
97
+
98
+
```bash
99
+
algokit localnet start
100
+
```
66
101
67
-
이 코딩 과제는 **총 4문제**로 구성되어 있습니다. 아래 설명을 차례대로 읽고 진행해주세요!
102
+
All code in this repo will be run in localnet.
68
103
69
-
### 로컬 네트워크 실행
70
-
1. 도커 데스크탑을 실행한 뒤 터미널에서 `algokit localnet start` 커맨드로 로컬 네트워크를 실행시켜주세요.[더 자세히 알고 싶다면 여기를 클릭해주세요!](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/localnet.md#creating--starting-the-localnet). 오늘 모든 코드는 로컬 네트워크에서 실행됩니다.
71
-
> 만약 로컬 네트워크 연결이 안되거나 뭔가 문제가 생기면 `algokit localnet reset` 커맨드로 로컬네트워크를 지우고 다시 생성하시면 됩니다.
104
+
> If there are issues with your localnet run the following command to reset the localnet.
105
+
106
+
```bash
107
+
algokit localnet reset
108
+
```
109
+
110
+
### Problem 1-4: Instructions
111
+
112
+
1. Make sure Python venv is activated in the `coding-assignment` terminal.
113
+
2. Go to`coding-assignment/smart_contracts/nft_marketplace/contract.py` to find instructions for problems 1-4. Read the instructions and solve the problem!
114
+
3. After solving all 4 problems run the following 2 commands to first build the smart contract and then run the `smart_contracts/nft_marketplace/deploy-config.ts` script.
2.`coding-assignment/smart_contract/nft_marketplace/contract.ts`로 가시면 문제 1-4가 주석으로 작성되어있습니다.
76
-
설명을 자세히 읽고 문제들을 해결하세요!
77
-
3. 문제를 다 해결한 뒤 터미널에서 `algokit project run build` 커맨드를 실행해 스마트 계약을 컴파일 하시고 `algokit project deploy localnet` 커맨드를 실행해 `smart_contracts/nft_marketplace/deploy-config.ts` 파일을 실행하세요!
> `deploy-config.ts` contains a script written with [AlgoKit Utils TypeScript](https://github.com/algorandfoundation/algokit-utils-ts/tree/main) that goes through the entire lifecycle of the nft marketplace contract by simulating a scenario where Taylor Swift concert ticket is being sold. Feel free to check out the code!
88
125
126
+
If you see something similar in your console, you have successfully solved all 4 questions! 👏👏 Congratulations!
1. 성공적으로 다섯 문제를 해결한 후 본인이 fork한 깃헙 리포로 코드를 푸쉬해주세요. 그런 다음 [원래의 리포로 Pull request를 해주세요.](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)
93
-
2. Pull Request 템플렛을 따라 출력된 값을 보여주는 터미널의 스크린샷을 첨부해주세요.
131
+
lets submit your code so that the world knows you are now an Algorand Python developer!
94
132
133
+
1. Push your code to the forked Github repo. [Then create a PR to the original repository.](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)
134
+
2. Follow the Pull Request template and attach the log of your console after running `algokit project deploy localnet`
0 commit comments