Links

Check BNS name expiration

How can I check the expiration block of a BNS name using the explorer sandbox?

Introduction

This guide will help you find out the expiration block for a BNS name so you can renew it on time. The namespace you registered in dictates the frequency with which you have to renew the name. Some examples: in the .id space renewal is required yearly, in the .btc namespace it is required every 5 years and in the .stx namespace the names never expire. This guide is valid for Stacks 2.4.

Steps to take to check the expiration block

  1. 1.
  2. 2.
    Click sandbox in the top right
  3. 3.
    Sign in with any address
  4. 4.
    Go to the second tab on the left to get the contract interface for BNS
  5. 5.
    Select the BNS contract
    The "call a contract" interface of the Hiro Explorer sandbox.
  6. 6.
    Select "name-resolve" (read only function)
  7. 7.
    add namespace (id), and name (1), see result by clicking "call function": lease ending at Stacks block 181323
  8. 8.
    Check current block height on explorer.hiro.so:
    181323-130283 = 51040 blocks difference
  9. 9.
    In this case the the domain was recently renewed and is valid for about 50k blocks, which is about a year because we expect about 144 blocks per day.