mesh icon indicating copy to clipboard operation
mesh copied to clipboard

resolvePlutusScriptHash cannot resolve a validator address with staking credentials

Open workshop-maybe opened this issue 1 year ago • 0 comments

I have a spending validator address that was derived with Cardano CLI using a command like this:

cardano-cli address build \
--payment-script-file myValidator.plutus \
--stake-verification-key-file myStake.vkey \
--mainnet 

The resulting address (in this example) is addr1z8d90zm2uavqpsl0pq8t7uqla3zxtlryfhmt253m2pz9dqcdu706suvddaa3zf095hfjgnxfex3xuwut8m4nshyjmxfsmejyfl

The Mesh function resolvePlutusScriptHash("addr1z8d90zm2uavqpsl0pq8t7uqla3zxtlryfhmt253m2pz9dqcdu706suvddaa3zf095hfjgnxfex3xuwut8m4nshyjmxfsmejyfl") returns the error:

Error: An error occurred during resolveScriptHash: Error: Couldn't resolve script hash from address: addr1z8d90zm2uavqpsl0pq8t7uqla3zxtlryfhmt253m2pz9dqcdu706suvddaa3zf095hfjgnxfex3xuwut8m4nshyjmxfsmejyfl.

A workaround would be to generate an enterprise address from the Plutus code for my validator, and then to resolve the Plutus Script Hash for that address. But I'd rather just be able to use resolvePlutusSciptHash on an address with staking credentials.

workshop-maybe avatar Feb 27 '24 20:02 workshop-maybe