{% macro render(index, input, tx, slp_genesis_info, sats_addr_prefix, tokens_addr_prefix, token_icon_url) %} {% let is_token = input.token|check_is_token %} {% let destination = input.output_script|destination_from_script(is_token, sats_addr_prefix, tokens_addr_prefix) %} {% let decoded_input_script = input.input_script|get_script %}
{% match input.prev_out %} {% when Some with (prev_out) %} {% if prev_out|check_is_coinbase %}
Coinbase
{% else %}
{{ index }}
{% match destination %} {% when Destination::Address with (address) %}
Copy to clipboard
{{ address.as_str() }} {% when Destination::P2PK with (pubkey) %} Pubkey: {{ pubkey|hexify_u8_vector }} {% when Destination::Unknown with (_bytes) %} Unknown {% when Destination::Nulldata with (_ops) %} Unreachable {% endmatch %}
{% match input.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 %}
{{ input.value|render_sats|safe }} XEC
{% when None %} {{ input.value|render_sats|safe }} XEC {% when None %} {% endmatch %} {% when None %} {{ input.value|render_sats|safe }} XEC {% endmatch %}
{% endif %} {% when None %} {% endmatch %}
{% endmacro %}