-
Notifications
You must be signed in to change notification settings - Fork 54
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
Custom colored #168
Custom colored #168
Conversation
if expected_value <= 0 or remaining_value <= 0: | ||
continue | ||
if expected_value > txout.value: | ||
expected_value = txout.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This results in a burn correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the value to be colored in the payload exceeds the actual Satoshis contained, only the Satoshis actually contained in this UTXO will be colored, and the burn amount will also be calculated correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
for atomical_id, atomical_info in sorted(ft_atomicals.items()): | ||
remaining_value = atomical_info.total_atomical_value | ||
for out_idx, txout in enumerate(tx.outputs): | ||
expected_output_index = str(out_idx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check that isinstance(out_idx, int)
is true first?
558c810
to
b9e26a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
if expected_value <= 0 or remaining_value <= 0: | ||
continue | ||
if expected_value > txout.value: | ||
expected_value = txout.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
# print(hash_to_hex_str(subject_atomical_id1)) | ||
operation_found_at_inputs = parse_protocols_operations_from_witness_array(tx, tx_hash, True) | ||
# z means costom color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
may I know what will happen if the user input float number in the payload's utxo? |
Define a "z" op, for custom color outputs.
Payload like this:
We can set any int in every outputs. and custom colored ft.
Be careful, If your payload is flawed, it may lead to unnecessary burned.