manual mint
This commit is contained in:
parent
21bed2c1f3
commit
bd05a03993
|
|
@ -149,19 +149,7 @@ slice calculate_nft_item_address(int wc, cell state_init) {
|
||||||
|
|
||||||
if (op == 0xCB33) { ;; mint nft throw next index
|
if (op == 0xCB33) { ;; mint nft throw next index
|
||||||
in_msg_body~skip_bits(64);
|
in_msg_body~skip_bits(64);
|
||||||
slice forward_content = in_msg_body~load_ref().begin_parse();
|
deploy_nft_item(next_item_index, nft_item_code, in_msg_body~load_coins(), in_msg_body~load_ref());
|
||||||
(int t_len, int t_xt) = encode_number_to_text(next_item_index);
|
|
||||||
builder mint_content = begin_cell()
|
|
||||||
.store_ref(
|
|
||||||
begin_cell()
|
|
||||||
.store_uint(0x6e6674732f6d657461646174612f, 112) ;; nfts/metadata/
|
|
||||||
.store_uint(t_xt, t_len * 8)
|
|
||||||
.store_uint(0x2e6a736f6e, 5 * 8) ;; .json
|
|
||||||
.end_cell()
|
|
||||||
)
|
|
||||||
.store_slice(forward_content);
|
|
||||||
|
|
||||||
deploy_nft_item(next_item_index, nft_item_code, in_msg_body~load_coins(), mint_content.end_cell());
|
|
||||||
next_item_index += 1;
|
next_item_index += 1;
|
||||||
save_data(owner_address, next_item_index, content, nft_item_code, royalty_params);
|
save_data(owner_address, next_item_index, content, nft_item_code, royalty_params);
|
||||||
return ();
|
return ();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue