Skip to content

Commit

Permalink
Merge branch 'main' of github.com:algorand-devrel/orakle-coding-assig…
Browse files Browse the repository at this point in the history
…nment-2024
  • Loading branch information
iskysun96 committed May 31, 2024
2 parents e022ac6 + 0fd5e84 commit bb2dfff
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def buy(
- 메서드 호출자(Txn.sender)가 앱의 생성자(Global.creator_address)인지 체크해야합니다.
# 2단계: withdraw_and_delete 메서드는 아래 기능들을 수행합니다.
1. 앱 계정에 있는 에셋(ASA)을 앱 계정으로 전송합니다. (AssetTransfer Transaction)
1. 앱 계정에 있는 에셋(ASA)을 앱 호출자 계정으로 전송합니다. (AssetTransfer Transaction)
이때 asset_close_to 패러미터를 앱 생성자(판매자)로 설정하여
앱 계정에 남아있는 에셋 전부를 앱 생성자(판매자)에게 보냅니다.
에셋의 수량과 무관하게 전 수량 송금되기 때문에 에셋 수량(asset_amount)은 설정하지 않으셔도 됩니다.
Expand Down
42 changes: 21 additions & 21 deletions projects/orakle-nft-marketplace-app-frontend/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
# uncomment below to use
# ======================

# VITE_ENVIRONMENT=local
VITE_ENVIRONMENT=local

# # Algod
# VITE_ALGOD_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
# VITE_ALGOD_SERVER=http://localhost
# VITE_ALGOD_PORT=4001
# VITE_ALGOD_NETWORK=""
# Algod
VITE_ALGOD_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
VITE_ALGOD_SERVER=http://localhost
VITE_ALGOD_PORT=4001
VITE_ALGOD_NETWORK=""

# # Indexer
# VITE_INDEXER_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
# VITE_INDEXER_SERVER=http://localhost
# VITE_INDEXER_PORT=8980
# Indexer
VITE_INDEXER_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
VITE_INDEXER_SERVER=http://localhost
VITE_INDEXER_PORT=8980

# # KMD
# # Please note:
# # 1. This is only needed for LocalNet since
# # by default KMD provider is ignored on other networks.
# # 2. AlgoKit LocalNet starts with a single wallet called 'unencrypted-default-wallet',
# # with heaps of tokens available for testing.
# VITE_KMD_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
# VITE_KMD_SERVER=http://localhost
# VITE_KMD_PORT=4002
# VITE_KMD_WALLET="unencrypted-default-wallet"
# VITE_KMD_PASSWORD=""
# KMD
# Please note:
# 1. This is only needed for LocalNet since
# by default KMD provider is ignored on other networks.
# 2. AlgoKit LocalNet starts with a single wallet called 'unencrypted-default-wallet',
# with heaps of tokens available for testing.
VITE_KMD_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
VITE_KMD_SERVER=http://localhost
VITE_KMD_PORT=4002
VITE_KMD_WALLET="unencrypted-default-wallet"
VITE_KMD_PASSWORD=""

# # ======================
# # TestNet configuration:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ export function getCurrentNftmClient(
주목!!!
- 3번째 줄에서 import { NftMarketplaceClient } from '../contracts/NftMarketplace'로 import한 클래스는
Nft 마켓플레이스 앱을 빌드할때 자동 생성된 클라이언트 클래스입니다.
- id값에는 currentAppId를 넣어주세요.
- 이 문제는 getCurrentNftmClient 함수의 인수로 들어오는 4개의 인수를 모두 사용하셔서 푸셔야 합니다.
- id값에는 getCurrentNftmClient의 인수값으로 들어오는 currentAppId를 넣어주세요.
- sender값에는 { addr: activeAddress!, signer }를 복붙해주세요. useWallet를 통해 현재 연결된 지갑 주소와 서명자를 포함한 객체를 설정해주는 코드입니다.
- NftMarketplaceClient 생성자의 두번째 인자인 algod는 algorandClient.client 안에 있습니다.
- NftMarketplaceClient 생성자의 두번째 인자인 algod는 getCurrentNftmClient의 인수값으로 들어오는 algorandClient의 algorandClient.client 안에 있습니다.
힌트: https://github.com/algorandfoundation/algokit-client-generator-ts/blob/main/docs/usage.md#creating-an-application-client-instance
*/
Expand Down

0 comments on commit bb2dfff

Please sign in to comment.