Skip to content

Commit

Permalink
Don't convert metadata to cell
Browse files Browse the repository at this point in the history
  • Loading branch information
d0rich committed Nov 17, 2023
1 parent 9ffa416 commit 30aa34d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contracts/contracts/d_social_network_master.tact
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "./messages_d.tact";
import "./d_social_network_account.tact";

contract DSocialNetworkMaster with Deployable, OwnableTransferable, Accounting {
version: String = "v0.0.1-metadata-as-json-string";
version: String = "v0.0.1-metadata-no-convertation-to-cell";
owner: Address;
next_account_index: Int as uint32 = 0;

Expand Down
4 changes: 2 additions & 2 deletions contracts/contracts/lib/messages_nft.tact
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

struct CollectionData {
next_item_index: Int;
collection_content: Cell;
collection_content: String;
owner_address: Address;
}

Expand Down Expand Up @@ -91,5 +91,5 @@ struct GetNftData {
index: Int;
collection_address: Address;
owner_address: Address;
individual_content: Cell;
individual_content: String;
}
4 changes: 2 additions & 2 deletions contracts/contracts/lib/trait_nft_collection.tact
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ trait NftCollection with Deployable, Ownable, Accounting {

// ===== Customizable functions ===== //

virtual fun getNftCollectionContent(): Cell {
virtual fun getNftCollectionContent(): String {
// let b: StringBuilder = beginString();
// let collectionDataString: String = self.collection_content.asSlice().asString();
// b.append(collectionDataString);
// b.append("meta.json");
// return b.toCell();
// TODO: if following works, remove the above
return self.collection_content.asSlice().asCell();
return self.collection_content;
}

virtual fun getNftItemInit(item_index: Int): StateInit {
Expand Down
4 changes: 2 additions & 2 deletions contracts/contracts/lib/trait_nft_item.tact
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ trait NftItem with Deployable, Ownable, Accounting {

// ===== Customizable functions ===== //

virtual fun getNftItemIndividualContent(): Cell {
virtual fun getNftItemIndividualContent(): String {
// let b: StringBuilder = beginString();
// let collectionData: String = self.individual_content.asSlice().asString();
// b.append(collectionData);
// b.append(self.item_index.toString());
// b.append(".json");
// return b.toCell();
// TODO: if following works, remove the above
return self.individual_content.asSlice().asCell();
return self.individual_content;
}

// --------- Get Function --------- //
Expand Down

0 comments on commit 30aa34d

Please sign in to comment.