Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nft custom color #190

Merged
merged 4 commits into from
May 29, 2024
Merged

Add nft custom color #190

merged 4 commits into from
May 29, 2024

Conversation

shadowv0vshadow
Copy link
Collaborator

Define a custom_color_nft_atomicals method, By specifying the payload, the NFT can be transferred to a specific output. If the value set in the payload is less than 0, it will be burned.

@shadowv0vshadow shadowv0vshadow changed the base branch from master to develop May 29, 2024 13:21

@classmethod
def custom_color_nft_atomicals(cls, nft_atomicals, operations_found_at_inputs, tx):
# define op `z` to custom-color nft
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it for 'z' ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, same with the Ft

expected_output_index = 0
else:
# if out_idx not in payload keys, skip
if str(out_idx) not in compact_atomical_id_data.keys():
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens to the nft if it's not specified and skipped?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If not specified defined, it will try to color output0. If defined, and the quantity is set to 0 or a negative number, it will burn.

Copy link
Owner

@atomicals atomicals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@shadowv0vshadow shadowv0vshadow merged commit 3b24c98 into develop May 29, 2024
2 checks passed
@wizz-wallet-dev wizz-wallet-dev deleted the bugfix/custom-color branch June 4, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants