Skip to content

Commit

Permalink
Fix account registration
Browse files Browse the repository at this point in the history
  • Loading branch information
d0rich committed Nov 12, 2023
1 parent a93c5a8 commit 895a6de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 6 additions & 8 deletions contracts/contracts/d_social_network_master.tact
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ contract DSocialNetworkMaster with Deployable, OwnableTransferable, Accounting
value: self.calculateFullAmountForSending(),
bounce: false,
mode: SendIgnoreErrors,
body: Transfer {
body: InitializeAccount {
query_id: 0,
new_owner: ctx.sender,
response_destination: self.owner,
custom_payload: emptyCell(),
forward_amount: 0,
forward_payload: emptySlice()
owner: ctx.sender,
collection_content: self.generateAccountCollectionContent(ctx.sender),
royalty_params: self.generateAccountRoyaltyParams(ctx.sender)
}.toCell(),
code: account_init.code,
data: account_init.data
Expand All @@ -41,12 +39,12 @@ contract DSocialNetworkMaster with Deployable, OwnableTransferable, Accounting
return initOf DSocialNetworkAccount(account_id, myAddress());
}

fun generateAccountCollectionContent(): Cell {
fun generateAccountCollectionContent(owner: Address): Cell {
require(false, "not implemented");
return emptyCell();
}

fun generateAccountRoyaltyParams(): RoyaltyParams {
fun generateAccountRoyaltyParams(owner: Address): RoyaltyParams {
require(false, "not implemented");
return RoyaltyParams{
numerator: 0,
Expand Down
1 change: 1 addition & 0 deletions contracts/contracts/lib/messages_nft.tact
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct RoyaltyParams {
}

message MintNft {
query_id: Int as uint64;
individual_content: Cell;
}

Expand Down
3 changes: 2 additions & 1 deletion contracts/contracts/messages_d.tact
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import "./lib/messages_nft.tact";
// Master contract

message RegisterAccount {

query_id: Int as uint64;
}

// Account contract

message InitializeAccount {
query_id: Int as uint64;
owner: Address;
collection_content: Cell;
royalty_params: RoyaltyParams;
Expand Down

0 comments on commit 895a6de

Please sign in to comment.