Get the contractaddress or tokenaddress from a transaction hash
When you deploy a Smart Contract, you get as a response a transaction hash.
Example response
{
"txId": "0x532cb74e9b5388a6ae46cf6d68e38f3ed28738c80949726b2b8b641bad58783f"
}
To get the contractAddress
, you can use the following REST API endpoint.
Example request (Polygon - testnet)
curl --location 'https://api.tatum.io/v3/blockchain/sc/address/MATIC/0x532cb74e9b5388a6ae46cf6d68e38f3ed28738c80949726b2b8b641bad58783f' \
--header 'x-api-key: {API_KEY}'
//response:
{"contractAddress":"0x5775f95675e23062e3e4a0683f03f22f012df7ce"}
Updated 9 months ago