Get the contractaddress or tokenaddress from a transaction hash
Deploying a smart contract returns a transaction hash; pass it to the smart contract address endpoint to get the deployed contractAddress.
When you deploy a Smart Contract, you get as a response a transaction hash.
Example response
{
"txId": "0x532cb74e9b5388a6ae46cf6d68e38f3ed28738c80949726b2b8b641bad58783f"
}To get the contractAddress, use the Get the blockchain address of a smart contract by the deployment transaction ID REST API endpoint.
Example request (Polygon - testnet)
curl --location 'https://api.tatum.io/v3/blockchain/sc/address/MATIC/0x532cb74e9b5388a6ae46cf6d68e38f3ed28738c80949726b2b8b641bad58783f' \
--header 'x-api-key: {YOUR_API_KEY}'Response:
{
"contractAddress": "0x5775f95675e23062e3e4a0683f03f22f012df7ce"
}Updated 8 days ago
Did this page help you?