From f4da701db2bdac92b61ca1a92bbf814a6623bbc8 Mon Sep 17 00:00:00 2001 From: Dreamer <745124335@qq.com> Date: Fri, 17 Jun 2022 09:24:25 +0800 Subject: [PATCH 1/2] update update-adr-043-nft-module --- docs/architecture/adr-043-nft-module.md | 35 +++++++++++++++---------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/docs/architecture/adr-043-nft-module.md b/docs/architecture/adr-043-nft-module.md index 7d4498bf843..5348c339fe0 100644 --- a/docs/architecture/adr-043-nft-module.md +++ b/docs/architecture/adr-043-nft-module.md @@ -113,24 +113,31 @@ This ADR doesn't specify values that `data` can take; however, best practices re ```go type Keeper interface { - NewClass(class Class) - UpdateClass(class Class) + NewClass(ctx sdk.Context,class Class) + UpdateClass(ctx sdk.Context,class Class) - Mint(nft NFT,receiver sdk.AccAddress) // updates totalSupply - Burn(classId string, nftId string) // updates totalSupply - Update(nft NFT) - Transfer(classId string, nftId string, receiver sdk.AccAddress) + Mint(ctx sdk.Context,nft NFT,receiver sdk.AccAddress) // updates totalSupply + BatchMint(ctx sdk.Context, tokens []NFT,receiver sdk.AccAddress) error - GetClass(classId string) Class - GetClasses() []Class + Burn(ctx sdk.Context, classId string, nftId string) // updates totalSupply + BatchBurn(ctx sdk.Context, classID string, nftIDs []string) error - GetNFT(classId string, nftId string) NFT - GetNFTsOfClassByOwner(classId string, owner sdk.AccAddress) []NFT - GetNFTsOfClass(classId string) []NFT + Update(ctx sdk.Context, nft NFT) + BatchUpdate(ctx sdk.Context, tokens []NFT) error - GetOwner(classId string, nftId string) sdk.AccAddress - GetBalance(classId string, owner sdk.AccAddress) uint64 - GetTotalSupply(classId string) uint64 + Transfer(ctx sdk.Context, classId string, nftId string, receiver sdk.AccAddress) + BatchTransfer(ctx sdk.Context, classID string, nftIDs []string, receiver sdk.AccAddress) error + + GetClass(ctx sdk.Context, classId string) Class + GetClasses(ctx sdk.Context) []Class + + GetNFT(ctx sdk.Context, classId string, nftId string) NFT + GetNFTsOfClassByOwner(ctx sdk.Context, classId string, owner sdk.AccAddress) []NFT + GetNFTsOfClass(ctx sdk.Context, classId string) []NFT + + GetOwner(ctx sdk.Context, classId string, nftId string) sdk.AccAddress + GetBalance(ctx sdk.Context, classId string, owner sdk.AccAddress) uint64 + GetTotalSupply(ctx sdk.Context, classId string) uint64 } ``` From 2378b857c4c219e1198ec87b73a9086785ff3c89 Mon Sep 17 00:00:00 2001 From: Dreamer <745124335@qq.com> Date: Sat, 18 Jun 2022 08:35:20 +0800 Subject: [PATCH 2/2] add changelog --- docs/architecture/adr-043-nft-module.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/architecture/adr-043-nft-module.md b/docs/architecture/adr-043-nft-module.md index 5348c339fe0..f343e1e7288 100644 --- a/docs/architecture/adr-043-nft-module.md +++ b/docs/architecture/adr-043-nft-module.md @@ -4,6 +4,7 @@ * 2021-05-01: Initial Draft * 2021-07-02: Review updates +* 2022-06-15: Add batch operation ## Status