1

** How to check the launch/mint date of tokens(SPL) created on solana network?**is there any way to check on any SOLANA explorer ?

2 Answers 2

2

Step 1: imports

const {
  Connection,
  PublicKey,
  clusterApiUrl
} = require("@solana/web3.js");
const moment = require('moment');

Step 2: function

const firstTimestamp = async () => {

  const mintID = new PublicKey("BrsE4BdXip29GLE8DqxqhzAiDVEW7LYzxWAabdfLLb3f");
  const connection = new Connection(clusterApiUrl("devnet"));
  const txList = await connection.getSignaturesForAddress(mintID, {});
  const unixTime = txList[txList.length-1].blockTime;
  const oldestTxTimestamp = moment.unix(unixTime).format("MM/DD/YYYY,h:mm:ss a")
  console.log(oldestTxTimestamp);
  return oldestTxTimestamp;
}
2
  • Unfortunately this requires you to loop through all the tx to find the first one :`(
    – Justin
    Commented Dec 13, 2023 at 1:04
  • it doesn't work if you have more than 1000 transaction, because getSignaturesForAddress return the last 1000 transactions by default. you can change this limit but it's between 1 and 1000
    – iori
    Commented Jan 13 at 13:39
1

You may use some service providing access to indexed db like dune.com and make a query like this.

SELECT
  *
FROM solana.account_activity
WHERE
    address = {{ address }}
ORDER BY
  block_time
LIMIT 1
1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Mar 8 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.