3 min de lectura
Metamask: How to get transaction link into etherumscan to my website using etherumscan API
CRYPTOCURRENCY
Here is an article that explains how to obtain the API Ethereumscan transaction link in its own site:
Title: How to obtain your Ethereum transaction link in your place using the API ethereumscan
Introduction:
Ethereumscan.io is a popular platform to show Ethereum transactions in its place. To show these transactions, you must obtain the transaction ID and link it to your site. In this article, we will show you how to do this using the API Ethereumscan.
Step 1: Create an account in Ethereumscan.io
First, create a new account in Ethereumscan.io. This will give access to the APIs of the platform.
Step 2: Get your transaction link
After creating your account, go to the tab
transactions and click «Get the transaction link» next to the transaction ID you want to show. You can find the transaction ID verifying the details of the transaction in the Ethereumscan.io panel.
For example, suppose you want to show a transaction with hash 0x1234567890abcdef
. The transaction link would be https: // ethherscan.io/tx/1234567890abcdef
Step 3: Get the link from your site
Now go to your place and add an IFRAME. Create an IFRAME with the following code:
`Html
)
This IFRAME will show the Ethereum transaction link in place.
Step 4: Update the transaction link of your site
Finally, update its site to point to Iframe that contains the transaction link. For example:
JavaScript
CONSTA URL = " tx/1234567890abcdef";
Document.getementbyid ('Link Transaction'). SRC = URL;
`
Tips and variations:
- You can also use the API Ethereumscan to obtain the details of the transaction, such as the value of the transaction, the gas rate, etc. You can show this information on your site with HTML or JavaScript models.
- If you want to obtain a link to each transaction instead of showing it directly in Iframe, you can modify the IFRAME code to indicate a specific page on your site that will contain the details of the transaction.
Conclusion:
It is easy to obtain its Ethereum transaction link in its place using the API ethereumscan. Following these steps, you can show transactions from different sources, such as Etherscan.io or its own blockchain platform, directly in place.
I hope this article has been useful! Let him know if he has any questions or needs more help.