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
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)
for those looking to use ```cardano-cli``
cardano-cli address build --$testnet --payment-script-file path/to/serialized-smartContract.plutus.json