diff --git a/projects/orakle-nft-marketplace-app-contracts/smart_contracts/nft_marketplace/contract.py b/projects/orakle-nft-marketplace-app-contracts/smart_contracts/nft_marketplace/contract.py index 7e68dbb..d95bf6d 100644 --- a/projects/orakle-nft-marketplace-app-contracts/smart_contracts/nft_marketplace/contract.py +++ b/projects/orakle-nft-marketplace-app-contracts/smart_contracts/nft_marketplace/contract.py @@ -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)은 설정하지 않으셔도 됩니다. diff --git a/projects/orakle-nft-marketplace-app-frontend/.env.template b/projects/orakle-nft-marketplace-app-frontend/.env.template index 7719613..97206d1 100644 --- a/projects/orakle-nft-marketplace-app-frontend/.env.template +++ b/projects/orakle-nft-marketplace-app-frontend/.env.template @@ -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: diff --git a/projects/orakle-nft-marketplace-app-frontend/src/utils/getCurrentNftmClient.ts b/projects/orakle-nft-marketplace-app-frontend/src/utils/getCurrentNftmClient.ts index 12aeec0..15c4741 100644 --- a/projects/orakle-nft-marketplace-app-frontend/src/utils/getCurrentNftmClient.ts +++ b/projects/orakle-nft-marketplace-app-frontend/src/utils/getCurrentNftmClient.ts @@ -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 */