Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts_Tolk/07_telemint/messages.tolk
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ struct ForwardPayloadInlineWrapper<T> {
struct (0x38127de1) ProvidedTeleitemBidInfo {
bidAmount: coins
bidTimestamp: uint32
}
}
7 changes: 3 additions & 4 deletions contracts_Tolk/07_telemint/storage.tolk
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ struct ItemStorageNotInitialized {
struct ItemStorage {
config: Cell<ItemConfig>
ownerAddress: address
content: Cell<ItemContent>
content: cell
token: Cell<ItemContent>
auction: Cell<Auction>?
royaltyParams: Cell<RoyaltyParams>
}
Expand Down Expand Up @@ -89,14 +90,12 @@ fun ItemStorage.save(self) {
contract.setData(self.toCell())
}


struct ItemConfig {
index: uint256
collectionAddress: address
}

struct ItemContent {
nftContent: cell
dns: cell?
tokenInfo: Cell<TokenNameAndDomain>
}
Expand Down Expand Up @@ -158,4 +157,4 @@ fun AuctionConfig.isInvalid(self) {
(self.minBidStep <= 0) |
(self.minExtendTime > 60 * 60 * 24 * 7) |
(self.duration > 60 * 60 * 24 * 365);
}
}
12 changes: 6 additions & 6 deletions contracts_Tolk/07_telemint/telemint-item-contract.tolk
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ fun initializeItemOnDeployingByCollection(uninitedSt: ItemStorageNotInitialized,
return {
config: uninitedSt.config,
ownerAddress,
content: ItemContent{
nftContent: msg.nftContent,
content: msg.nftContent,
token: ItemContent{
dns: null,
tokenInfo: msg.tokenInfo,
}.toCell(),
Expand Down Expand Up @@ -414,9 +414,9 @@ get fun get_nft_data(): NftDataReply {

get fun get_telemint_token_name(): TelegramString {
val storage = lazy ItemStorage.load();
val itemContent = lazy storage.content.load();
val tokenInfo = lazy itemContent.tokenInfo.load();
return tokenInfo.tokenName;
val content = lazy storage.token.load();
val tokenData = lazy content.tokenInfo.load();
return tokenData.tokenName;
}

get fun get_telemint_auction_state(): AuctionStateReply {
Expand Down Expand Up @@ -460,4 +460,4 @@ get fun get_telemint_auction_config(): AuctionConfigReply {
get fun royalty_params(): RoyaltyParams {
val storage = lazy ItemStorage.load();
return storage.royaltyParams.load();
}
}