user3953: I'm checking the Value locked by certain ValidatorHash of another script that I deployed. Does anyone know how to get Ledger.Address or ValidatorHash from Plutus or cardano-cli? I know the "address" that is a string that starts with "addr_test1..." but how do I turn that into the above Plutus types?
Sort of like this question but for ValidatorHash. I know that you can use cardano-cli transaction policyid for monetary policies, is there an equivalent for ValidatorHash?
Thanks!

user3953: Just tested on testnet, cardano-cli transaction policyid --script-file ... works.
Just make sure in your Haskell code to include something like the following to turn it into an address:
testnetDumpValidatorHash :: ValidatorHash
testnetDumpValidatorHash = "10101010110101010101010101010101010101010101010101123456"
 
testnetDumpAddress :: Ledger.Address
testnetDumpAddress = scriptHashAddress testnetDumpValidatorHash


3953: <p>I'm checking the <code>Value</code> locked by certain <code>ValidatorHash</code> of another script that I deployed. Does anyone know how to get <code>Ledger.Address</code> or <code>ValidatorHash</code> from Plutus or cardano-cli? I know the &quot;address&quot; that is a string that starts with &quot;addr_test1...&quot; but how do I turn that into the above Plutus types?</p>
<p>Sort of like <a href="https://cardano.stackexchange.com/questions/4274/how-to-convert-a-cardano-address-into-a-public-key-hash">this</a> question but for <code>ValidatorHash</code>. I know that you can use <code>cardano-cli transaction policyid</code> for monetary policies, is there an equivalent for <code>ValidatorHash</code>?</p>
<p>Thanks!</p>
 3953: <p>Just tested on testnet, <code>cardano-cli transaction policyid --script-file ...</code> works.</p>
<p>Just make sure in your Haskell code to include something like the following to turn it into an address:</p>
<pre><code>testnetDumpValidatorHash :: ValidatorHash
testnetDumpValidatorHash = &quot;10101010110101010101010101010101010101010101010101123456&quot;
 
testnetDumpAddress :: Ledger.Address
testnetDumpAddress = scriptHashAddress testnetDumpValidatorHash
</code></pre>
