3

Once I have written up the smart contract how to I get the script address value to be able to interact with the script whilst its on chain?

2 Answers 2

1

There's multiple ways to do it. For example using cardano-addresses or Pycardano library

Pycardano:

script_cbor_hex = '...'
script = cbor2.loads(bytes.fromhex(script_cbor_hex))
script_hash = plutus_script_hash(script)
script_address = Address(script_hash)
1

for those looking to use ```cardano-cli``

cardano-cli address build --$testnet --payment-script-file path/to/serialized-smartContract.plutus.json

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.