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
2.`orakle-nft-marketplace-app-contracts/smart_contract/nft_marketplace/contract.ts`로 가시면 문제 1-4가 주석으로 작성되어있습니다.
69
+
2.`orakle-nft-marketplace-app-contracts/smart_contract/nft_marketplace/contract.py`로 가시면 문제 1-4가 주석으로 작성되어있습니다.
69
70
설명을 자세히 읽고 문제들을 해결하세요!
70
71
3. 문제를 다 해결한 뒤 터미널에서 `algokit project run build` 커맨드를 실행해 스마트 계약을 컴파일 하시고 `algokit project deploy localnet` 커맨드를 실행해 `smart_contracts/digital_marketplace/deploy-config.ts` 파일을 실행하세요!
72
+
```bash
73
+
algokit project run build
74
+
```
75
+
76
+
```bash
77
+
algokit project deploy localnet
78
+
```
71
79
실행 후 다음과 같은 콘솔 값이 출력되면 성공적으로 모든 문제를 해결하신겁니다! 👏👏 이제 문제 5-9로 넘어가세요.
-> 팁: Global이라는 AVM opcode를 통해 여러 정보를 열람할 수 있습니다. 자세한 사항은 아래 힌트 1을 참고해주세요.
70
+
-> 팁: Global이라는 AVM opcode를 통해 min_balance, asset_opt_in_min_balance와 같은 여러 정보를 열람할 수 있습니다. 자세한 사항은 아래 힌트 1을 참고해주세요.
71
71
72
72
# 2단계: bootstrap 메서드는 아래 기능들을 수행합니다.
73
73
1. asset_id 글로벌 상태를 인수로 들어온 판매할 ASA 아이디로 업데이트합니다.
@@ -82,7 +82,7 @@ def __init__(self) -> None:
82
82
힌트 1 - Global Opcode: https://algorandfoundation.github.io/puya/api-algopy.html#algopy.Global
83
83
힌트 2 - How to Inner Transaction: https://algorandfoundation.github.io/puya/lg-transactions.html#inner-transactions
84
84
힌트 3 - Asset Transfer Inner Txn: https://algorandfoundation.github.io/puya/api-algopy.itxn.html#algopy.itxn.AssetTransfer
85
-
힌트 4 itxn asset transfer 코드 예시: https://github.com/algorandfoundation/puya/blob/2acea25a96c0acd818e9410007d473b2a82e754d/examples/amm/contract.py#L357
85
+
힌트 4 - itxn asset transfer 코드 예시: https://github.com/algorandfoundation/puya/blob/2acea25a96c0acd818e9410007d473b2a82e754d/examples/amm/contract.py#L357
86
86
"""
87
87
88
88
"문제 2 시작"
@@ -104,7 +104,7 @@ def bootstrap(
104
104
105
105
함수 인수 설명:
106
106
- buyer_txn: 앱 계정으로 어토믹 그룹에 묶여 동시다발적으로 보내지는 payment 트랜잭션입니다. 에섯 구매를 위해 구매자가 Algo를 보내는 Payment transaction입니다.
107
-
- quantity: 구매할 에셋(ASA)의 수량을 나타내는 UInt64 타입의 인수입니다.
107
+
- quantity: 에셋(ASA)을 몇개 구매할건지 나타내는 UInt64 타입의 인수입니다.
108
108
109
109
# 1단계: assert로 buy 호출 조건을 체크하세요.
110
110
- bootstrapped 글로벌 상태가 True인지 체크하세요. False라면 부트스트랩이 안된 상태입니다.
힌트 2 - Asset Transfer Inner Txn: https://algorandfoundation.github.io/puya/api-algopy.itxn.html#algopy.itxn.AssetTransfer
124
-
힌트 3 itxn asset transfer 코드 예시: https://github.com/algorandfoundation/puya/blob/2acea25a96c0acd818e9410007d473b2a82e754d/examples/amm/contract.py#L357
124
+
힌트 3 - itxn asset transfer 코드 예시: https://github.com/algorandfoundation/puya/blob/2acea25a96c0acd818e9410007d473b2a82e754d/examples/amm/contract.py#L357
125
125
"""
126
126
"문제 3 시작"
127
127
@@ -131,7 +131,6 @@ def buy(
131
131
buyer_txn: gtxn.PaymentTransaction,
132
132
quantity: UInt64,
133
133
) ->None:
134
-
135
134
"여기에 코드 작성"
136
135
137
136
"문제 3 끝"
@@ -172,6 +171,10 @@ def buy(
172
171
- close_remainder_to: 알고 전액이 송금될 주소
173
172
174
173
이때 두 트랜잭션 다 앱 계정이 보내는 트랜잭션이기 때문에 Inner Transaction을 사용하세요!
힌트 2 - itxn asset transfer 코드 예시: https://github.com/algorandfoundation/puya/blob/2acea25a96c0acd818e9410007d473b2a82e754d/examples/amm/contract.py#L357
0 commit comments