{% macro render(index, output, tx, slp_genesis_info, sats_addr_prefix, tokens_addr_prefix, token_icon_url) %} {% let is_token = output.token|check_is_token %} {% let destination = output.output_script|destination_from_script(is_token, sats_addr_prefix, tokens_addr_prefix) %} {% let decoded_output_script = output.output_script|get_script %}
{% match destination %} {% when Destination::Address with (address) %}
Copy to clipboard
{% when Destination::Nulldata with (_ops) %} OP_RETURN data {% when Destination::P2PK with (pubkey) %} Pubkey: {{ pubkey|hexify_u8_vector }}, {% when Destination::Unknown with (_bytes) %} Unknown {% endmatch %}
{% match output.token %} {% when Some with (slp_token) %} {% match slp_genesis_info %} {% when Some with (genesis_info) %} {% if slp_token.amount > 0 || slp_token.is_mint_baton %} {% if slp_token.is_mint_baton %}
Mint baton
{% else %} {{ slp_token.amount|to_i128|render_token_amount(genesis_info.decimals)|safe }} {{ genesis_info.token_ticker|string_from_lossy_utf8 }} {%endif %} {% endif %} {% match token_hex %} {% when Some with (token_hex)%} {% when None %} {% endmatch %}
{{ output.value|render_sats|safe }} XEC
{% when None %} {{ output.value|render_sats|safe }} XEC {% endmatch %} {% when None %} {{ output.value|render_sats|safe }} XEC {% endmatch %}
{{ index }}
{% match output.spent_by %} {% when Some with (outpoint) %} {% when None %} {% endmatch %}
{% endmacro %}