is there any way to get contract address from Asset ID?
A SHA-256 hash is used to derive the AssetId
from the ContractId
and SubId
. though, directly retrieving the ContractId from an AssetId is difficult because it requires reversing a hash function, which is computationally impractical.
Instead, you can usually track the mapping between ContractId and AssetId during the contract deployment or asset creation process. If you have this mapping saved somewhere, you can use it to find the ContractId for a specific AssetId.
can we use something like graphql queries to get this data?
Hi @lokesh-lync and @div-lync could you speak a little more directly to your use case? As @Nazeeh21 explained, it’s a bit of a round about way to go about retrieving the Contract’s address and I suspect there is a far more direct way for it to be retrieved.